This is what I've made
bridge = script.Parent.Parent.bridge
function onTouched()
bridge.CanCollide = true
bridge.Transparency = 0
end
script.Parent.Touched:connect(onTouched)
but I want it to do this
bridge = script.Parent.Parent.bridge
if function onTouched() == false then
bridge.CanCollide = true
bridge.Transparency = 0
else
bridge.CanCollide = false
bridge.Transparency = 1
end
script.Parent.Touched:connect(onTouched)

4 comments
u forgot to do then do if function onTouched() == false then
It still says that the "if function onTouched() == false then" is untrue. It has a red line unter onTouched
Use the TouchEnded API
Use the TouchEnded API