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

How would I implement rotation into this script, making the object rotate with the CFrame?

Asked by 4 years ago

Hello, I'm currently making a door, based off a old script of when you interact, it rotates (to a 0, -90, 0 position).

for i = 0, 1, SPEED do for _, door in next, Door:GetChildren() do originalDoorCFrame[door] = originalDoorCFrame[door] == nil and door.CFrame or originalDoorCFrame[door] if door:IsA("BasePart") then door.CFrame = originalDoorCFrame[door]:Lerp(originalDoorCFrame[door] + originalDoorCFrame[door].LookVector * (DISTANCE*factor), i) end end wait() end

Any help is appreciated!

0
Is the door a model or a part? A_thruZ 29 — 4y

1 answer

Log in to vote
0
Answered by
Markdrg 15
4 years ago

Alright your making it too complicated so I'm going to just make a whole new script for you since I'm not at that level yet. Jesus Though anyways:

Door = script.Parent

Door.Cframe = Door.CFrame * CFrame.fromEulerAnglesXYZ(0,0,0) --Whatever you'd like
Ad

Answer this question