So, I'm new to scripting, and I did a script, but it didn't work. Can you guys help me?
function onTouched()
script.Workspace.MessageBlock1.MessageScript.CanCollide = false
wait(14)
script.Workspace.MessageBlock1.MessageScript.CanCollide = true
end
Thats the code. plus my goal was making MessageBlock1 to block the player from bypassing it, but when you wait 14 seconds, it is now bypassable.

2 comments
Hi.. :D To start off in order for us to help you we're going to need more information on your actual script. What you gave us is referred to as a function, and only a segment of what makes up an actual script. All we see here is a bunch of lines of code that we personally do not know what they do so we can't help you debug this. A few things you can provide us are: The rest of the script so we can
Is
MessageScripta Script? If it is.. scripts don't have aCanCollideproperty. Also there is no connection statement in your code. And as for it becoming bypassable again.. lines 3 and 4 are the cause..