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

Help me please?

I am making a point giver, when you click the part it gives you the chosen amount of money I made it to give you. I put it in a local script and it doesn't work. The points go into a value in the text which lists then amount of money. Here is the script:

plr = game.Players.LocalPlayer
points = plr.PlayerGui:FindFirstChild("MoneySystem").Money.Points
give = 5
debounce = false

function point()
if points == nil then
print("Not found")
else
if debounce then
debounce = true
print("It's found")
points.Value = points.Value + give 
wait(1)
debounce = false
end
end
end
script.Parent.ClickDetector.MouseClick:connect(point)

--there isn't anything wrong in the Output. Help?

2 comments

0

I dont see the error in your code

0

EXACTLY, but it doesn't work for some reason ;-;

1 answer

Local scripts only run in: The local player. The backpack. or the player GUI.

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