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

Is there a way to get the position left of a part with the angle?

Okay so, I have a game, and there is a tween and when I tween it, some of the parts have an angle at 40 degrees or like 90 degrees. So my question is, how would I get the position to the left of the part with the angle, like, the part will move left with or without a different angle but, I am trying to get the part to move left of what the angle is at.

Part 1's angle is at 60 degrees, I move the part up a few studs and left a few studs

Part 2's angle is at 90 degrees, I move the part up a few studs

Although, I do not know the angle which makes this even trickier.

what I have tried doing is, sobbing and crying. Which wasn't helpful.

local part = workspace.Part
part.Position = part.Orientation.Magnitude * part.Position.Magnitude
-- ok i do not know the rest

If someone knows how to fix this, please tell me, I would greatly appreciate some code or some math, thanks.

3 comments

0

I'm pretty sure this involves CFrame. If I'm not mistaken, this sounds like you should use ToObjectSpace() or ToWorldSpace().

0

Im not sure what you are asking. Please include an img of what you are looking for.

0

like, the direction left of an angle @kingdom5

1 answer

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