Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont this work it grabs the player name but doesn't work?

Asked by 6 years ago
Edited 6 years ago

script.parent.Touched:connect(function(hit)

local Name = hit.parent.Name

game.players.Name.leaderstats.Cash.value = game.players.Name.leaderstats.Cash.value + 10 end)

1 answer

Log in to vote
0
Answered by 6 years ago
script.Parent.Touched:connect(function(hit)
local plrname = hit.Parent.Name
game.Players[plrname].leaderstats.Cash.Value = game.Players[plrname].leaderstats.Cash.Value +10 
end)
0
Thank you ChronoStrike -7 — 6y
Ad

Answer this question