Hello, I just made an animation and I wanna when you enter the game make it play, is there any way to do that?
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?
No, it is not for an player, it is for an Cube FBX:
https://gyazo.com/413167a39ec822136f433cfa72e5bf6b
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.
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.
Part1
--// 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 = Instance.new("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
Also I made this and doesn’t works
I mean, I wanna make the cube play an animation when the server creates and make it loop.
My friend made me this script:
local idle = nil
wait(2)
idle = script.Parent.AnimationController:LoadAnimation(script.Idle)
idle:Play()
while true do
wait(5)
script.Parent.Cube.Sound:Play() ------- On " Cube " put the name of how you called the mesh
local call = script.Parent.AnimationController:LoadAnimation(script.Call)
call:Play()
end
then you must put the animation under script then call the aniamtion " Idle "
ALL SCRIPT CREDITS TO POOGLIES