I also want it to have it so that yu can only step on it ONCE. For example, i will use this in an obby. When they step on a block, they get +1 leader point. But when they go back to their previous checkpoint, it wouldnt give them a point. So its technically a stage counter but in a less complex way.
Try This:
script.Parent.Touched:Connect(function(hit) local Hum = hit.Parent:FindFirstChild("Humanoid") if Hum then local plr = game.Players:GetPlayerFromCharacter(hit.Parent) local sname = "Credits" -- The name of the stat local sval = 25 -- How much to give plr.leaderstats:FindFirstChild(sname).Value = sval end end)
If you want something more intense I can create it :). Hope this helps!
Maybe place a script inside the object and do
object = script.Parent debounce = true
object.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and debounce then debounce = false humanoid = hit.Parent:FindFirstChild("Humanoid") if humanoid then local plr = game.Players:GetPlayerFromCharacter(humanoid.Parent) plr.Leaderstats.Points = plr.Leaderstats.Points + 1 -- Change where its located end end end)