I have my own inventory and I was wondering is it possible so when the 1 button is pressed it equips their item in their backpack? I have done all the no. stuff, removed robloxs one and made it so when they click a button a sword is put in their backpack, but I don't know how to make it so its equipped. Is there something like :Equip() or something?
script.Parent.StartGui.ClassFrame.Buttons.PlayKnightButton.MouseButton1Down:connect(function(onClick)
script.Parent.Inventory.MainFrame.InvSpace.Inv1.Image = "rbxasset://Textures/Sword128.png"
local Item = game:GetService("ReplicatedStorage").Weapons.Sword
Item:Clone().Parent = game.Players.LocalPlayer.Backpack
Item:Clone().Parent = game.Players.LocalPlayer.StarterGear
char:WaitForChild("Humanoid"):EquipTool(player.Backpack:GetChildren())
end)

5 comments
thanks :D
No problem.
They lose their equip when they die, can I just do a while true do loop?
I have editted my question with the script fully
Edited my answer