Animation not playing at all, help!

So I rigged a door and of course, scripted it, but the problem is that the animations are not playing:


Script:

local openAnim = script.Parent.KeyFrames:LoadAnimation(script.Open)
local closeAnim = script.Parent.KeyFrames:LoadAnimation(script.Close)
local openedAnim = script.Parent.KeyFrames:LoadAnimation(script.Opened)
local EnterT = script.Parent.EnterTrigger
local ExitT = script.Parent.ExitTrigger
local LockSound = script.Parent.Center.Lock
local OpenSound = script.Parent.Center.Open
local opened = false

EnterT.Touched:Connect(function()
	if not opened then
		opened = true
		openAnim:Play()
		LockSound:Play()
		wait(0.5)
		OpenSound:Play()
		openedAnim:Play()
	end
end)

ExitT.Touched:Connect(function()
	if opened then
		opened = false
		closeAnim:Play()
		OpenSound:Play()
		openedAnim:Stop()
		wait(0.5)
		LockSound:Play()
	end
end)

No errors in the output. Help?

2 Likes

Is your door anchored? I dont think animations are able to play if the thing trying to be animated is anchored, try using TweenService to animate the door?

@lMelin19 If you don’t understand programming then why did you reply to the topic?

The doors are not anchored;

Trust me, if I use TweenService it will be more complicated for me.

What is more weird is that only 1 door works, from all of them. (the most recent added door)

Did you do anything different on that door from the others or are they all exactly the same?

They are the same. I used CTRL + D, other 2 doors works, but hey are scripted different, so that doesn’t matters…

Wym scripted different? Maybe that could be why? Show me the script in one of the working doors

This is the script of a Prox. Prompt activated door:

local openAnim = script.Parent.KeyFrames:LoadAnimation(script.Open)
local closeAnim = script.Parent.KeyFrames:LoadAnimation(script.Close)
local openedAnim = script.Parent.KeyFrames:LoadAnimation(script.Opened)
local LockSound = script.Parent.Center.Lock
local OpenSound = script.Parent.Center.Open
local opened = false

function open()
	openAnim:Play()
	LockSound:Play()
	wait(0.5)
	OpenSound:Play()
	openedAnim:Play()
end

function close()
	closeAnim:Play()
	OpenSound:Play()
	openedAnim:Stop()
	wait(0.5)
	LockSound:Play()
end

script.Parent.Parent.Parent.Buttons.Level4.Trigger.ProximityPrompt.Triggered:Connect(function()
	open()
	wait(8)
	close()
end)

It looks exactly the same besides the ways the animation plays. It has to be 2 things then, a rigging issue or you placed the incorrect ids in the Animation instances?

I have checked the IDs 2 times. They are correct. The rigging is fine, two Motor6Ds for the 2 doors. I am so confused…

just try to replace broken doors with that working door

or maybe doors have joint to other parts, if they have, they cant move

Here is how they are rigged:
image

just try to move model a bit with auto joints disabled, maybe there is joint between door and background

1 Like

Oh my god, thank you! I used join surfaces to use the doors, but that got stuck! Thank you so much!

2 Likes