Please answer this. I have no idea to do this.
Bruh, please, I think you can try it yourself. You're warned.
Uh, anyway, this is the script though.
Before this, make a NumberValue in the game, and parent the Value to a part, and insert a script into the part that you inserted that NumberValue.
debounce = false -- we use debounce to prevents spams while wait(.5) do -- update the script every 0.5 seconds script.Parent.Touched:Connect(function(plr) -- if people touched debounce = true script.Parent.Value.Value = 1 -- make the value become 1 debounce = false end) script.Parent.TouchEnded:Connect(function(plr) -- if people touch ended then debounce = true script.Parent.Value.Value = 0 -- make the value become 0. debounce = false end) end
Anyways, here's the script, so if you have more questions, PM me, or question below! I'll be glad to help. But please don't ask for the script again, try it yourself first, thanks!