Alright, so I was trying to make a script where if you reach 10000 strength, the game puts a new tool in your backpack. Here is the main part:
local strength = Instance.new("NumberValue") strength.Name = "Strength" strength.Parent = leaderstats print("Strength Loaded!") if strength.Value == 10000 then local bar = serverStorage.Tools.SteelBar bar.Parent = player.Backpack end
doesnt seem to work tho.
1) You should clone that tool before parenting it 2) When you're showing us variables make sure we know what they are 3) The if statement runs right after you just parented the value, I'd suggest linking a Changed event of the Value to a function and checking then if the strength is 10000 or wtever u wanted it to be like so:
strength.Changed:Connect(function() if strength.Value == 10000 then local tool = game.ServerStorage.Tools.SteelBar:Clone() tool.Parent = Player.Backpack end end)
Where is leaderstats
in the game files?
Have you defined player
?
It's ServerStorage
not serverStorage
Please have a look at the output before asking, it should give you a lot of info to work with.