Door CFrame not working properly

At first I want to say that I am a complete noob at scripting.
I’ve got a door script that uses TweenService to open and it works really well, I modified the CFrame to rotate even further and it’s working well, I decided to modify it even more so the door handle would move downwards when opening and closing and that’s how the problems started, since I tried almost everything and the door either opened and the handle didn’t move, the handle stayed in place or the whole door didn’t even open. Does anyone know what’s wrong with it and if yes, please explain it to me? I’ve kept the CFrame angles unnatural so I could actually see if the handle moves or not
properties

local TweenService = game:GetService("TweenService")
local door = script.Parent
local doorHinge = door.PrimaryPart
local doorOpen = TweenInfo.new()
local handleHinge = door.HandlesFrame

local doorCFrame = TweenService:Create(doorHinge, doorOpen, {
	CFrame = doorHinge.CFrame * CFrame.Angles(-400, math.rad(0),0)
})

local doorCFrameClosed = TweenService:Create(doorHinge, doorOpen, {
	CFrame = doorHinge.CFrame * CFrame.Angles(0, math.rad(0),0)
})

local HandleCFrame = TweenService:Create(handleHinge, doorOpen, {
	CFrame = handleHinge.CFrame * CFrame.Angles(400, math.rad(0),0)
})

local HandleCFrameClosed = TweenService:Create(handleHinge, doorOpen, {
	CFrame = handleHinge.CFrame * CFrame.Angles(0, math.rad(0),0)
})

local ProximityPrompt = script.Parent.ProximityPrompt
local PromptVanish = ProximityPrompt.Enabled == false
local PromptAppear = ProximityPrompt.Enabled == true

ProximityPrompt.Triggered:Connect(function()
	doorCFrame:Play()
	ProximityPrompt.Enabled = false
	script.Parent.Open:Play()--rbxassetid://192416578
	wait(3)
	doorCFrameClosed:Play()
	ProximityPrompt.Enabled = true
	wait(1)
	script.Parent.Close:Play()

end)

1 Like