hit = true
game.Workspace.ThunderChange.Touched:connect(function(hit)
if hit == true then
print("Hit equals 1")
repeat hit = false until hit == false
elseif hit == false then
print("Hit equals 2")
repeat hit = true until hit == true
end
end)
A simple script I made that detects when an object is touched. I want to make it change a sound from true to false or false to true using one block. It won't print to output or even work. Anyone understand why this won't work. Also when I hit the block when it did work, with would deploy like 1000x. How can I keep that from happening?

2 comments
Thank you! It triggers really fast still but at least it works!
np, you can add a debounce and wait if you need to to reduce the speed with which the event fires