Animation NOT showing on other players (CLOSED)

Hello!

So today, I was working on a Sonic the Hedgehog (STH) Project. But there is one issue… The running animation when you go fast doesn’t play on other people.

Please help me on this, its really my dream to make a Sonic game!

Also, here is a video on what’s happening:

robloxapp-20210912-0853003.wmv (1.7 MB)

1 Like

We need the script that play the animation for helping you

here is the entire script

local character = script.Parent
local humanoid = character:WaitForChild(‘Humanoid’)

local jumpSound = script:WaitForChild(‘JumpAudio’)

local r = humanoid:LoadAnimation(script:WaitForChild(“RunAnimation”))
local jump = humanoid:LoadAnimation(script:WaitForChild(“JumpAnimation”))

humanoid.Running:Connect(function(speed)
if speed > 55 and not r.IsPlaying then
r:Play()
elseif speed < 55 and r.IsPlaying then
wait()
r:Stop()
end
end)

humanoid.StateChanged:Connect(function(newstate)
if newstate == Enum.HumanoidStateType.Jumping then
r:Stop(); jump:Play(); jumpSound:Play()
end
end)

humanoid.StateChanged:Connect(function(newstate)
if newstate == Enum.HumanoidStateType.Landed then
jump:Stop()
end
end)

while true do
wait()
if humanoid.MoveDirection == Vector3.new(0,0,0) then
humanoid.WalkSpeed = 1
else
humanoid.WalkSpeed = humanoid.WalkSpeed + 1.9
if humanoid.WalkSpeed >= 60 then
humanoid.WalkSpeed = 60
end
end
end

is this a local script or a serverscript?

1 Like

its a localscript, and im so confused why its not showing on other people.

1 Like

the reason it’s not showing for other players is because a local script only affects the local player.

1 Like

Local script only plays on the client, so that’s why the server isn’t seeing it.
I’m not good with animations so I’m not sure how to solve

1 Like

but the localscript is in the startercharacterscripts folder…

1 Like

also how come? cause my jumping animation shows for the rest of the players.

1 Like

did you publish the animation to yourself or to a group?

1 Like

i published the running animation myself, why?

1 Like

It doesn’t matter where the local script is. It must be a server script if you want all players to see it at the same itme.

Because when you press space, it makes your humanoid jump set to true, which is in the workspace so it’s server sided

2 Likes

Im not sure why but whenever i also publish to myself the animations shows only to me but not to other players. So i would recommend republishing it to a group because that seems to work also make sure your animation priorities are all set to action since it’s the highest animation priority

4 Likes

I’m pretty sure his animation works, but the problem is that it only plays on the client

1 Like

yeahhhhhhhhhh that didnt work for me…

1 Like

here let me try writing a script in studio that may help solve your problem

1 Like

my animation priority is on action…

1 Like

nevermind, my animation priority was on movement… thank you so much!

3 Likes

Well all the animation priority does is decide if the animation overrides the walking and jumping animations and stuff. it won’t actually make it show on the server. You gotta figure out how to make the animations play on a server script. You can view the server by switching between client and server on the home tab when testing.

btw, i was gonna put the animation priority on action before, but then i said “eh, ima just put the animation priority on movement.”