Hi!
So I was trying to make a closet hiding system like doors. (But bad)
And the closet opening works, but the animation doesn’t… so basically the closet doesn’t open.
Here’s the script:
local TweenServ = game:GetService("TweenService")
local door1 = script.Parent.Door1
local hinge1 = script.Parent.Hinge1
local prompt = script.Parent.Door1.ProximityPrompt
local goalOpen = {}
goalOpen.CFrame = hinge1.CFrame * CFrame.Angles(0, math.rad(90), 0)
local goalClose = {}
goalClose.CFrame = hinge1.CFrame * CFrame.Angles(0,0,0)
local tweenInfo = TweenInfo.new(0.5)
local tweenOpen = TweenServ:Create(hinge1, tweenInfo, goalOpen
local tweenClose = TweenServ:Create(hinge1, tweenInfo, goalClose)
prompt.Triggered:Connect(function()
if prompt.ActionText == "Close" then
tweenClose:Play()
prompt.ActionText = "Open"
else
tweenOpen:Play()
prompt.ActionText = "Close"
end
end)