I want this script to check if whatever hit it is a ball. If it is, it will make the door cancollide true. Otherwise, false. But all it does it make it cancollide false when a ball hits it. Help?
script.Parent.Touched:connect(function(hit)
if hit.Parent.Name == "LobbyBall" then
script.Parent.CanCollide = true
wait(1)
return
else
script.Parent.CanCollide = false
wait(1)
return
end
end)
