Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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)

1 comment

0

Thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.