Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a corrected version of OnTouch and OnTouchEnded?

Asked by 5 years ago
Edited 5 years ago

This, isn't a request... I have a problem with my OnTouch script, I feel like the problem is more of a roblox problem. However, this is what happens: When I touch the desired block, the script works fine. But when I move around (take note that I'm still on the desired block) my OnTouchEnded executes.

I want OnTouch to run only once when the player gets on the block (I'd also like if the player can freely move around the block without any interruptions), then after the player steps off the block, my OnTouchEnded will execute.

I appreciate any help! Send any links to help me achieve my goal! Thank you!

0
You might be able to add some "if-then" statements for the OnTouchEnded function. What's likely happening here is the OnTouchEnded is fireing everytime your legs move up off the part. (from your walking animation) Somthing you could try is making the actual part you touch one or so studs above the platform. (invisible/can't collide) Other then that, the best solution would be to use ray casting in mbramblet 80 — 5y

Answer this question