I have a points/money system in my leaderboard, and I would like to know how to make a part award the player that touches it to gain a "point" in the leaderboard.
How would I do this?
Thank you.
script.Parent.Touched:connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then player = game.Players:GetPlayerFromCharacter(hit.Parent) player:FindFirstChild("leaderstats").Points.Value = player:FindFirstChild("leaderstats").Points.Value + 1 end end)
I fixed it, you're welcome!
Want it to wait before it can be used again? Here
script.Parent.Touched:connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then player = game.Players:GetPlayerFromCharacter(hit.Parent) player:FindFirstChild("leaderstats").Points.Value = player:FindFirstChild("leaderstats").Points.Value + 1 script.Disabled = true wait(5) --Change 5 to anything script.Disabled = false end end)