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

0

Maybe you should use :FindFirstChildOfClass("Tool") into Backpack folder, I don't know if it returns the first tool, you should try anyways...

0

I got " FindFirstChildOfClass is not a valid member of Backpack" when trying that.

0

Don't forget the two dots before FindFirstChildOfClass

0

I made sure to put the two dots, and it still gave me the same error.

0

since the tool is in the backpack make the parent the character

0

Still gave me the same error. Here's the code I'm using, I'm making a render system for my game.

0

:FindFirstChildOfClass will return the object if it finds something, otherwise it will return nil