Try this script, I made a delay for the animation to load.
-- Made by Frosty
local character = script.Parent
local hum = character:WaitForChild("Humanoid"):WaitForChild("Animator")
-- checks for animation
local animation = script:FindFirstChildOfClass("Animation")
if not animation then
warn("animation doesnt exit")
return
end
-- plays da aniamtion
local anim = hum:LoadAnimation(animation)
anim.Priority = Enum.AnimationPriority.Action4
task.wait(0.25)
anim:Play()
if anim.IsPlaying then
print("Animation is playing")
end
-- checks for startup
local startupSound = script:FindFirstChild("Startup")
if startupSound and startupSound:IsA("Sound") then
startupSound:Play()
else
warn("startup doesnt exist")
end
-- Made by Frosty
local character = script.Parent
local hum = character:WaitForChild("Humanoid"):WaitForChild("Animator")
-- checks for animation
local animation = script:FindFirstChildOfClass("Animation")
if not animation then
warn("animation doesnt exit")
return
end
-- plays da aniamtion
local anim = hum:LoadAnimation(animation)
anim.Priority = Enum.AnimationPriority.Action4
anim:Play()
if anim.IsPlaying then
print("Animation is playing")
end
-- checks for startup
local startupSound = script:FindFirstChild("Startup")
if startupSound and startupSound:IsA("Sound") then
startupSound:Play()
else
warn("startup doesnt exist")
end
Try this script, I specified the character through the player
-- Made by Frosty
local plr = game.Players.LocalPlayer
local character = plr.Character
local hum = character:WaitForChild("Humanoid"):WaitForChild("Animator")
-- checks for animation
local animation = script:FindFirstChildOfClass("Animation")
if not animation then
warn("animation doesnt exit")
return
end
-- plays da aniamtion
local anim = hum:LoadAnimation(animation)
anim.Priority = Enum.AnimationPriority.Action4
task.wait(0.25)
anim:Play()
if anim.IsPlaying then
print("Animation is playing")
end
-- checks for startup
local startupSound = script:FindFirstChild("Startup")
if startupSound and startupSound:IsA("Sound") then
startupSound:Play()
else
warn("startup doesnt exist")
end
-- Made by Frosty
local character = script.Parent
local hum = character:WaitForChild("Humanoid"):WaitForChild("Animator")
-- checks for animation
local animation = script:FindFirstChildOfClass("Animation")
if not animation then
warn("animation doesnt exit")
return
end
-- plays da aniamtion
local anim = hum:LoadAnimation(animation)
anim.Priority = Enum.AnimationPriority.Action4
for _, animationTrack in ipairs(hum:GetPlayingAnimationTracks()) do
animationTrack:Stop()
end
anim:Play()
if anim.IsPlaying then
print("Animation is playing")
end
-- checks for startup
local startupSound = script:FindFirstChild("Startup")
if startupSound and startupSound:IsA("Sound") then
startupSound:Play()
else
warn("startup doesnt exist")
end
Inside StarterCharacterScripts.
Wouldn’t suggest server as I explained here: