#items system
1 messages · Page 1 of 1 (latest)
first u should detect when spefific buttons are pressed like 1,2,3,4,5,6,7,8,9 and ` or backtick for opening backpack
then create a variable called selected that holds the value of which item is selected
it should look like this kinda
local selected = nil
UIS.InputBegan:Connect(function(input, gpe)
if gpe then return end
if input.KeyCode == Enum.KeyCode.One then
if selected == 1 then
itemUneqipped(1)
selected = nil
else
itemEquipped(1)
selected = 1
end
the point of making this selected value is so that when the function detects the same selected value again, we know the player pressed the same number twice and wants to de equip it
besides that you just change and update the UI accordingly
make sure u say ```game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
so the actual rblx gui appears
** You are now Level 2! **
how do you know how to like print this out
im a scripter and i need tutorials to have a general idea
i want to make a game