Hello! I would like to know if someone could share code with me to know how to script an animation in an updated way, since my code is very outdated. pease
Otherwise, could you tell me how to play an animation correctly please
Hello! I would like to know if someone could share code with me to know how to script an animation in an updated way, since my code is very outdated. pease
Otherwise, could you tell me how to play an animation correctly please
Example:
local Animation = Instance.new("Animation")
local Animator = game:GetService("Players").LocalPlayer.Character:WaitForChild("Humanoid"):WaitForChild("Animator")
Animation.AnimationId = "rbxassetid://ID"
Animator:LoadAnimation(Animation):Play()
Read here for guidance on where to play animations depending on your usecase.
Thanks you a lot! and what about stop to stop the animation?
AnimationObject:Stop()
You can read more on animations in the link I provided in my previous post.
No problem!
Also make sure to play any animations on the client since it replicates to the server.
Thanks you guys!! for the tips and all
Incorrect, I suggest you read the page I linked.