#hi, sorry if im asking some obvious questions but im not an expert at scripting yet, still learning

1 messages · Page 1 of 1 (latest)

short knoll
#

im struggling to make an elevator work, the elevator works and the door too, but when the elevator reaches the mines the door teleports back to the original location (surface)
I need the door to remain at the current location when opening/closing

#

ps, dont mind the 1st door, that one isn't scripted just yet

shell axle
#

Damn

#

Organize your script lol

#

It’s a mess

short knoll
#

ik

shell axle
#

I would totally help you but i can’t figure out with all these functions

short knoll
#

it's okay

shell axle
#

Hold on

short knoll
shell axle
#

If you use RS as replicatestorage

#

What you use to RunService

short knoll
short knoll
#

anyone know how to fix it?

indigo imp
indigo imp
short knoll
indigo imp
short knoll
#

what properties (sorry for not understanding, english isn't my first language)

indigo imp
short knoll
indigo imp
# short knoll

CFrames contain position and rotation, so you're saving the original CFrame of the door

So when its time for it to do its thing, its going to move to the original position

for hinge tweens, try just using Orientation

short knoll
short knoll
indigo imp
short knoll
grim groveBOT
#

studio** You are now Level 8! **studio

indigo imp
short knoll
#

that works too

short knoll
short knoll
# indigo imp I can help guide you but I wont do it for you

local function OpenDoor1()
local OpenDoor1Goal = {CFrame = hinge.CFrame * CFrame.Angles(0, math.rad(90), 0)}
local OpenDoor1Tween = TweenService:Create(hinge, info, OpenDoor1Goal)
OpenDoor1Tween:Play()
end

local function OpenDoor2()
local OpenDoor2Goal = {CFrame = hinge2.CFrame * CFrame.Angles(0, math.rad(-90), 0)}
local OpenDoor2Tween = TweenService:Create(hinge2, info, OpenDoor2Goal)
OpenDoor2Tween:Play()
end

like this?

#

IT WORKSS

#

wait but now how do i make them close-

#

tysfm

#

okay weird small but not script breaking bug

indigo imp
short knoll
#

i fixed it

short knoll
short knoll