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

Getting touch position in a Touch function?

Is there any way to return the position of the collision in a Touched function without making complex algorithms?

3 comments

0

I don't think so. You could always request the position of the part. That's about the easiest way to check if it were touching a part as large as the baseplate.

0

Darn... Anyways, if you had to program It to get the touch position of a part, you have to program them for any kind of shapes, like wedges or spheres

0

nope, there is a lot of super hard algorithms to justify this but nothing simple at all...

1 answer

Nope, you CANNOT do this with the standard ".touched" function (unless you want the position of whatever touched your object). The simple fix should be this:

YourVariableName = YourObjectsLocation.Hit.Position

Yes, it's as simple as that.

You can then run something like...

print(YourObjectsLocation.Hit.Position)

...and you would get its coordinates.

If you can any questions or issues, please contact me. ;)

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