I have a script that is supposed to drain your health while you are touching and inside the block. It works fine in test mode, but in the real game, sometimes it keeps draining your health when you aren't in contact with the block AT ALL, so you just die and can't prevent it.
Here is the script: https://zerobin.net/?8ea3c4b3304bd382#r+u5VAeNsX5iGKHruzxV6/JLt4o23y9mS4jtXLFp8nQ=
Okay,
How can I fix this script, or what can I do to make it work?
Why would it work differently in the real game than test mode? Isn't it called test mode for a reason?

6 comments
Try using Connect instead of connect, since connect is depricated
Thanks for commenting saSlol2436, I am not the most experienced scripter and a friend made this script for me. I tried doing what you did, replacing all the connects with Connect, but it changed nothing. Did I do it wrong?
Is this a server script or a local script?
It's a server script.
In game, press f9 and look at the server log, tell me if there are any errors
I assume the errors are the ones in red text? The only one I have is "Could not create collision group." which I assume has nothing to do with this.