Try checking in the game, not in the studio itself
aight btw it still doesnt work on npc
its animation isuse because ingame its still broken
Try reuploading the animation or test this:
-- 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 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
OH WAIT i just realised the npc works
it doesnt work on the player but on npc yes
Test this:
-- 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
wait i just realised somethingā¦ im trying to make a serverscript run in the playercharacter
Running animations on server is not a good idea, you will meet some delays.
Dude, make that script localā¦ LOL LOL
wait it works thru server i just put a wait on the start :o
Put this on local:
-- 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:
oh yeah I remembered that there can be delays before the script and the script may not work
yeah, the animation was too quick, but i though it was ok cus the sound was on time
yeah but i need server cause its a battlegrounds game and i want the animations to be showed in everyoen
Animations is replicated to everyone no matter what is it
It seems like if you play the animation through a local script, then all players should see it
aight i will check
word limitttttttttt