Hello, So I'm trying to make a part that gives you points when you touch it and it has a cooldown. The part's size is the size of an ocean and when I jump into the ocean it gives me only 1 point and when I jump again it gives me 1 points, So it just gives me points when I jump into the ocean and when I'm jumping in the ocean.
I tried doing it in a server script and it does the same thing.
Local Script (Inside PlayerGui):
local Part = game.Workspace.Part
Part.Touched:Connect(function()
if Debounce == false then
Debounce = true
wait(1)
script.Parent.Parent.Parent:WaitForChild("leaderstats").Points.Value = script.Parent.Parent.Parent:WaitForChild("leaderstats").Points.Value + 1
Debounce = false
end
end)
I would really appreciate it if you will help me with my problem, Plus I'll accept your answer.
Thanks, MajinBluee

4 comments
Is your game FE?
Yes
Did you say that it doesn't work at all? You need to be more clear please because I thought you meant that it doesn't work the way you want it to work.
This should be handled on the server.