I want the player to be able to gain a random ability. So I have something they can buy one from. It then loops through checks a folder that has all the “tool” abilities. And copies a random one to the player.
The thing is, is that I don’t want the player to get one they already have. I’m not sure how exactly to do this.
if not player.Backpack:FindFirstChild(tool.Name) then
--add tool
end
Basically you want to make sure there is no child within the player’s backpack with the same name as your tool, and if there isn’t we can add tools to that player.
1 Like
Oh my goodness, I thought I had to do loops and stuff. I don’t know why I didn’t realize I could do that.
Thanks so much!
That was small brain moment on my part.
1 Like