Door Animations on my Vehicle are only seen by the driver and not others

So most of the day I’ve been working on Door Animations using Roblox’s Animation Editor. I’m proud of it. However while testing on a Studio Sever, I found out something with the animations.

The driver unlocks the doors and the passenger presses the button to open it. It should play the door opening animation, but it doesn’t for the passenger, only the driver. It’s the same with door closing. I’ve attached a video here.

More information:

Animations are located in the doors:

image

(This is Door 1 but Door 2 is pretty much the same)

I hope I can get some help because it would be a shame to have to scrap this, it’s one of my favourite things I’ve developed! :slight_smile:

Can we see your script please?

I had trouble with animations only playing on the server or for one client before, what I did to fix it was set the priority of the animation in the animation editor itself instead of the script. That fixed it for for me(don’t ask me how).

Button (To Open)

local open = false

local AnimationController = script.Parent.Parent.Parent.Parent.LeftDoors.LeftDoor1Anim:WaitForChild("AnimationController")
local DoorOpenAnimation = AnimationController.DoorOpen

local DoorOpeningAnimation = AnimationController:LoadAnimation(DoorOpenAnimation)


script.Parent:WaitForChild("ClickDetector").MouseClick:connect(function()

if open == false or script.Parent.Parent.Parent.TrainVariables.LeftDoor1Open.Value == false then	

script.Parent.Parent.Parent.TrainVariables.LeftDoor1Open.Value = true	
script.Parent.Parent.Parent.Parent.LeftDoors.LeftDoor1Anim.DoorLeft1.DoorOpen:Play()

open = true	

DoorOpeningAnimation:Play()

end

DoorOpeningAnimation.Stopped:Connect(function()
    DoorOpeningAnimation:AdjustSpeed(0)
    DoorOpeningAnimation.TimePosition = DoorOpeningAnimation.Length
end)

end)

I don’t really want to post my entire RemoteEvent script to be honest…

Have you tried opening it a few times to see if it will play for both people after a few tries?

What did you set it to? I barely know animations I’ve only just started with them to be honest

For some reason it just opened for both

This is so confusing

EDIT: Only one door worked

Here check this page out, explains Animation Priority

I set mine to action

It could be that it takes longer to load for some people???

:man_shrugging: I don’t know, this isn’t my expert field

That’s what it says on wiki

If an Animator is a descendant of a Humanoid or AnimationController in a Player’s Character then animations started on that Player’s client will be replicated to the server and other clients.

If the Animator is not a descendant of a player character, its animations must be loaded and started on the server to replicate.

The Animator object must be initially created on the server and replicated to clients for animation replication to work at all. If an Animator is created locally, then AnimationTracks loaded with that Animator will not replicate.

Yeah I’ve read that but I don’t understand it

Basically you should create animations via server script if you’re not doing that.

So I should create the animations with instance.new into the AnimationController?

Yeah

30 characters

I’ve tried it but it’s still not working.

And you should do it with server script!!!

AnimationTracks should be played on the server in order to replicate correctly

I’ve said it IS in a server script