I need a script where you only can press the part that has a ClickDetector in it a certain amount of times, for each player. This is the script so far, any help appreciated. Thank you in advance.
``script.Parent.MouseClick:Connect(function() if Character:WaitForChild("Humanoid").WalkSpeed + 76 end end)``
Well my guess is that you wanted the player to be able to click it only twice. heres a little script that you can build off of.
local TimesLeftToClick = 2 script.Parent.MouseClick:Connect(function(Player) if TimesLeftToClick >= 1 then TimesLeftToClick = TimesLeftToClick - 1 Player.Character:WaitForChild("Humanoid").WalkSpeed = Player.Character:WaitForChild("Humanoid").WalkSpeed + 76 end end)