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

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

Asked by 5 years ago

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.

0
I'm pretty sure this involves CFrame. If I'm not mistaken, this sounds like you should use ToObjectSpace() or ToWorldSpace(). DeceptiveCaster 3761 — 5y
0
Im not sure what you are asking. Please include an img of what you are looking for. User#5423 17 — 5y
0
like, the direction left of an angle @kingdom5 greatneil80 2647 — 5y

1 answer

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

me 2 years ago thinking cframes were irrelevant and absolutely absurd

me 2 years later remembering how I use to think it was irrelevant: Most useless link with an image of width 52, height 27 of a screenshot i took in discord in 3 seconds

Ad

Answer this question