So, often times people do this:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Waiti()
local humanoid = char:WaitForChild("Humanoid")
local animationTrack = humanoid:LoadAnimation(x)
However, this doesn't work often times.
The reason why is that, even though the player has a character, the character doesn't get put into workspace by the game instantly. So simply use this:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Waiti()
local humanoid = char:WaitForChild("Humanoid")
char.Parent = workspace
local start = humanoid:LoadAnimation(char:WaitForChild("Animations"):WaitForChild("MagicStart"))
1 comment
You could add a wait(3) or whatever number you want after local start =