Basically, this script worked like yesterday, but now for some reason it just doesn’t work, well, everything else works except from the hinge rotating, I don’t know why.
local prox = script.Parent.Door.ProximityPrompt
local hinge = script.Parent.Hinge
local shutSound = script.Parent.Door.door_shut
local openSound = script.Parent.Door.door_open
local cframe = hinge.CFrame
prox.Triggered:Connect(function(plr)
print(“1”)
if prox.ActionText == “Open” then
openSound:Play()
prox.ActionText = “Close”
print(“2”)
hinge.CFrame = hinge.CFrame * CFrame.Angles(0,math.rad(90), 0)
print(“3”)
elseif prox.ActionText == “Close” then
shutSound:Play()
prox.ActionText = “Open”
hinge.CFrame = cframe
end
end)