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

How to I move/rotate relative to the global space?

Asked by 8 years ago

If you've used ROBLOX's animation plugin you should know what I mean. If not, then take a look at this. See how it rotated differently than if I tried to rotate it relative to the part? It's even more explained by this. See how it moves relative to the part on local space, and relative to the world in global space? That's what I mean. I thought for sure I figured out how to move objects globally, but I was dead wrong. It was the same concept as the local movement. So now I'm stuck with having no idea as of what to do to move parts in a global space. I have the same problem with rotating. Any answer/comment will be appreciated!

--This is how I rotate parts:
workspace.Part.CFrame = workspace.Part.CFrame * CFrame.Angles(math.rad(45), 0, 0)
--That moves it 45 degrees on the X Axis.

--To move parts:
workspace.Part.CFrame = workspace.Part.CFrame * CFrame.new(5, 0, 0)
--That moves it 5 studs on the X Axis

Also, note I'm actually trying this with welds, so it may react differently then I actually expect it to

1
I'm not 100% sure what you are asking, but if you press CTRL+L when on a part it should switch it from global/local movement Nexx 51 — 8y
0
Er, I meant in a script. Not in Studio. I'm making a plugin and I want Global/local movement. If you play around with the ROBLOX Animation plugin you should know what I mean lightpower26 399 — 8y

Answer this question