hello, i watned to move a part like this back and forth as a door. i do this and it works, but as i call all these doors from 1 script its difficult to call a specific orientation for each door i put in workspace. how can i move a door like the following: (example from my game)
this works, but doors that arent specifically called for the orientation of dont work the same way.
a door that doesnt have specifically called orientation
how can i do this from a script?
current script:
local SRQC = Vector3.new(0,0,4)
TweenService:Create(mic:FindFirstChild("TopPart"), TweenInfo.new(.5,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0), {CFrame = mic:FindFirstChild("TopPart").CFrame + SRQC}):Play() ;
mic is the door
for some doors, they dont need to move 0,0,4 . they need to move 4,0,0 and 0,0,-4 and so forth according to their orrientation even sometimes decimals like 3.87,0,0 etc. how can i call the front facing part of the door, and move it for example 4 studs to the left? maybe using lookat? im not sure.