Hello, I wanted to ask if there was any way for the first gear in your backpack to be auto-equipped? I already know how to auto-equip a specific gear, but I haven't seen anything about equipping the first gear. Thanks.
This is the code I'm using, it's for a player render system in my game.
for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do print(v) wait(1) if v:IsA('Tool') then game.Players.LocalPlayer.Backpack:FindFirstChildOfClass("Tool").Parent = game.Players.LocalPlayer.Character game.Players.LocalPlayer.Character.Torso['Right Shoulder'].CurrentAngle = math.pi / 2 end end

7 comments
Maybe you should use :FindFirstChildOfClass("Tool") into Backpack folder, I don't know if it returns the first tool, you should try anyways...
I got " FindFirstChildOfClass is not a valid member of Backpack" when trying that.
Don't forget the two dots before FindFirstChildOfClass
I made sure to put the two dots, and it still gave me the same error.
since the tool is in the backpack make the parent the character
Still gave me the same error. Here's the code I'm using, I'm making a render system for my game.
:FindFirstChildOfClass will return the object if it finds something, otherwise it will return nil