Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Each seat has it's own animation?

So recently i visited Vibe Train and saw that it has a cool feature - there is a different animation for each seat. I know how to make animations and make them play, but i can't seem to put different animations for another seats. My first animation applies for every seat.I didn't find any information about how to do this. I need help.

I'm very new to creating games though and i know nothing about coding, so if you're to help, please tell me exactly what to do.

1 answer

Use the Occupant Property on the seat and then load the animation on that humanoid. Heres an example below:

 seat:GetPropertyChangedSignal("Occupant"):Connect(function()
    local humanoid = seat.Occupant 
    if humanoid then
		animation=humanoid:LoadAnimation(animationlocation)
		animation:Play()
	end
end)
		

You will need to change both of the seats to where your seat is located of course and change animationlocation to an animation instance

This discussion is preserved as it was. New answers, comments, and votes are closed.