Im sorry if this question is complicated, but I want to know how to make it so the players must click a certain block 50 times in one minute. If they do it in that amount of time, it resets and they keep on having to do it, but if they fail to click the block 50 times in one minute, the block underneath them becomes non-collidable. Could someone help? (I am not a good scripter whatsoever.)
COMMUNITY QUESTION
How do i make a block non-colidable if action isnt complete?
1 answer
This code should work, you just need a few things.
A part in the workspace with a click detector, a number value named "ClickValue", and a script.
Another part in the workspace called "Fall Part"
Put this code into the script:
local numberOfClicks = script.Parent.ClickValue
script.Parent.ClickDetector.MouseClick:Connect(function(onClick)
if numberOfClicks.Value < 50 then
numberOfClicks.Value = numberOfClicks.Value + 1
elseif numberOfClicks.Value >= 50 then
print("50 clicks!")
end
end)
while wait(60) do
if numberOfClicks.Value < 50 then
workspace.FallPart.CanCollide = false
print("They fell")
elseif numberOfClicks >= 50 then
print("They are Saved")
end
end
There are a few flaws in here though, for instance this would be server-wide, and it would check every 60 seconds if the number of clicks was 50.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Do you want it to be no collide for one player or for all players?
One player.