I basically need help finding a way to script a GUI button so that when a player clicks the button, the script finds out who clicked it and then goes into game.Workspace.Playerwhoclicked.Intvalue . I made the following script but I am not convinced that it receives only that players info. Script:
function onClicked(Player)
local c = game.Players:GetChildren()
for i = 1, #c do
local candy = c[i].Character:findFirstChild("Money")
print(candy.Value)
end
end
script.Parent.MouseButton1Click:connect(onClicked)

3 comments
Wait, is the money a leaderstat or a intvalue INIDE the character playing the game
Its a int value inside the character playing the game.
Any help guys?