Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

The Touched Event is too slow?

So I have a brick in my game that has some Touched Event code. The script is a server-side script and my game is FE. The problem comes when I change the velocity of the brick. What happens is the Touched Event takes longer to recognize that the character is there than when the character starts moving due to velocity. If I move the script to the client then would that help? Are there other ways to prioritize the Touched Event?

1 answer

First try to add a

print("Some random text")

to the beginning of the event script, to see if Touched is really delayed. You can tell if the text has a delay displaying after you touched it, there is a problem. Otherwise, there is nothing wrong with the event, maybe the BodyVelocity doesn't activate immediately or there is something wrong with the script. Hope I helped!

4 comments

0

Just to add to this answer, BodyVelocity (if that's what you are using) applies a force that accelerates until something is a certain speed. A larger P makes it accelerate faster http://wiki.roblox.com/index.php?title=API:Class/BodyVelocity. This answer assumes the Touched event is not actually slow however.

0

I agree with you. Just another note is that if PGS is enabled, the P value is ignored. Thank you very much for adding to my answer!

0

I realized the problem and it wasn't due to velocity but might have effected by it

0

Hi, was wondering how you had fixed this as I am also having similar issues.

This discussion is preserved as it was. New answers, comments, and votes are closed.