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

How can I touch a brick and make myself gain money? (Leaderboard IntValue)

Asked by 10 years ago

I don't understand how you would make it affect the player who touched the brick. Would you type the script as if it changes for everyone except make it a local script? Please help.

1 answer

Log in to vote
1
Answered by
dyler3 1510 Moderation Voter
10 years ago
function Touched(Plr)
if game.Players[Plr.Parent.Name]~=nil then
game.Players[Plr.Parent.Name].leaderstats.money.value=game.Players[Plr.Parent.Name].leaderstats.money.value+5 ---Change '5' to whatever amount you want the player to gain.
end

script.Parent.Touched:connect(Touched)

Ad

Answer this question