Hello Devforum,
I’ve been trying to make these doors open fully and function properly on first try. However, no matter what I do it seems like the problem is never fixed.
I’ve tried pre-loading the animations by making sure not to run it when Length
is not the length of the Animation.
if OpenTrack.Length < 0.5 then return end -- so it fully loads
Other than that, I can’t think of a reason for why the Animation doesn’t work first try and just pauses randomly. Here’s the main logic of opening and closing the door.
if not IsOpen then
-- open door
OpenSound:Play()
OpenTrack:Play()
local c = nil
c = OpenTrack.Stopped:Connect(function()
OpenTrack:AdjustSpeed(0)
IsOpen = true
print("here")
c:Disconnect()
ProxPrompt.ObjectText = "Close"
end)
else
-- close door
OpenTrack:AdjustSpeed(1)
CloseSound:Play()
OpenTrack:Stop()
IsOpen = false
print("piwe")
ProxPrompt.ObjectText = "Open"
end
Do y’all know any workarounds for this sporadic behavior?? Thanks for your time.