Script play animation issue script

Hello, I just made an animation and I wanna when you enter the game make it play, is there any way to do that?

1 Like

Would you not use use a game.Players:PlayerAdded and connect it up with a function and then play it on the player which joined?

1 Like

No, it is not for an player, it is for an Cube FBX:

1 Like

You still could use the player joined event just run the animation on the cube instead of the player. You said you want it to play when a player joined so that is all you can do I belive to know if a player joined.

I just don’t see why you can’t run it using the player added event as all it does is runs the stuff if u link it to a function when a player joins like u said in the post.

1 Like

Firstly. If you want the animation to only play on 1 player create a localscript in StarterPlayerScripts. And upload the animation to Roblox.

Now here you go.

--// Variables
local cube = game.Workspace.Cube --Set this to the cube that is animated.
local Humanoid = cube:WaitForChild("Humanoid") --Calls the humanoid to animate.
local animationid = "rbxassetid://" --Put your animation ID here.

local anim ="Animation") --Creates an Animation Objects.
anim.AnimationId = animationid --Sets the Animation ID

wait(5) --Wait as long as you want.
local animT = Humanoid:LoadAnimation(animationtrack) --Load the animation
animT:Play() --Play the animation
animT.Stopped:wait() --Wait for it to stop

--// Cleanup

anim:Destroy() --Deletes the animation Object
1 Like

Now what do I do, doesn’t works.

pd: the " cube " is an FBX so has this items in :

1 Like

Also I made this and doesn’t works

1 Like

I mean, I wanna make the cube play an animation when the server creates and make it loop.

1 Like

My friend made me this script:

local idle = nil


idle = script.Parent.AnimationController:LoadAnimation(script.Idle)


while true do


script.Parent.Cube.Sound:Play() ------- On " Cube " put the name of how you called the mesh

local call = script.Parent.AnimationController:LoadAnimation(script.Call)



then you must put the animation under script then call the aniamtion " Idle "


BTW, final product: