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!
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
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
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.