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

How do i detect the rotation of a surface thats been touched?

Trying to make a tool where you throw down a spinning motion detector and it connects to a wall/floor/ceaing the corect way up depending on the surface its on. I know how to make the rest of the tool but I'm clueless to how to do this part of it.

1 comment

0

Hmmm.... My first thought is raycasting, casting rays at four corners to determine a surface rotation.

1 answer

Perhaps you can use CFrames to do it. Get the part that was touched and then read the orientation values of that part's CFrame. To make it "the correct way up" just copy the touched part's values to make it the same orientation.

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