-
What do you want to achieve? Replicate animation from client to server
-
What is the issue? Animation doesn’t replicate from client to server and only playing if i move character on server
-
What solutions have you tried so far? I tried LoadAnimation both Humanoid and Animator still no progress but when I move the player character on server animations starts replicating, I really don’t get why it’s happening
Is your code in a local script?
Because if it is in a local script it will work only for the client and won’t show up in the server.
I’m pretty sure animations are replicating from client to server but its weird that i play it on client and its working after i move character on server
Try putting it in a script rather than a local script and test that out. And in the video, I think your animation finished by the time you switched to the server side.
According to the developer wiki, If the Animator is not a descendant of a player character, its animations must be loaded and started on the server to replicate.
The problem is its working good after I move it on the server side but if I don’t animation don’t start replicating, i want it to replicate not change to server script
a
I checked too, animator is child of humanoid and animations are descendants of stand model which getting added AFTER i press button to get stand but still animations doesn’t replicate to server until i move it on server side
I found a few problems with your script.
- It’s a module script and you’ll need to call the function in some other script.
- It has “FireServer()” which you can’t use in a normal script. It will only work in a local script.
- It won’t replicate if your function is in a local script.
The module is calling, the script is a local script, as I said I’m pretty sure animations are replicating from client to server but its replicating after i move character please watch video
I have same problem but with guns, i asked my friend(he is cool scripter) to help and he did, for him everything worked but for me no so i just trying to make my own animation system lol
can you please send code it helps us a lot to fix your problem thanks
local Animations = function(Humanoid,StandHRP)
local animator = Humanoid
print(animator)
wait(1)
return
{
["NOTHING"] = animator:LoadAnimation(StandHRP.Nothing),
["IDLE"] = animator:LoadAnimation(StandHRP.Idle),
["BLOCK"] = animator:LoadAnimation(StandHRP.Block),
["LPUNCH"] = animator:LoadAnimation(StandHRP.LeftPunch),
["RPUNCH"] = animator:LoadAnimation(StandHRP.RightPunch),
["SPUNCH"] = animator:LoadAnimation(StandHRP.StrongPunch),
["SKICK"] = animator:LoadAnimation(StandHRP.StrongKick),
["TIMESTOP"] = animator:LoadAnimation(StandHRP.TS),
["STANDJUMP"] = animator:LoadAnimation(StandHRP.StandJump),
["ROAD-ROLLER"] = animator:LoadAnimation(StandHRP.Roller),
["POSE"] = animator:LoadAnimation(StandHRP.Pose1),
["ATTACK-POSE"] = animator:LoadAnimation(StandHRP.AttackPose),
["ROLL"] = animator:LoadAnimation(StandHRP.Roll),
}
end
return Animations
Appear Function
local Appear = function(Cooldowns,Animations,Sounds,Remotes)
if Cooldowns["Processed"] then return end
if Cooldowns["StandAppearedCD"] then return end
Cooldowns["StandAppearedCD"] = true
if not Cooldowns["StandAppeared"] then
Cooldowns["StandAppeared"] = true;
--Animations["NOTHING"]:Stop()
Animations["IDLE"]:Play(0.2, 1, 1)
--Remotes["Sound"]:FireServer(Sounds["APPEAR"], true)
Remotes["Appear"]:FireServer(true)
elseif Cooldowns["StandAppeared"] then
Cooldowns["StandAppeared"] = false;
Animations["IDLE"]:Stop()
--Animations["NOTHING"]:Play(0.2, 1, 1)
Remotes["Appear"]:FireServer(false)
end
wait(2.5)
Cooldowns["StandAppearedCD"] = false
end
return Appear
Ok so i deffinatly dont unerstand your code for some reason but you can use remote events to load animation in humanoid animator using a sever script and then play the animation using the same server script heres how it goes:
game.ReplicatedStorage[NAME].OnServerEvent:Connect(function(plr,animid)
script.Animation.AnimationId = animid
local anim = plr.Character.Humanoid.Animator:LoadAnimation(script.Animation)
anim:Play()
end)
kindly fix careless mistakes in code because i wrote this in dev forum not roblox studio sorry for the inconvienience
The problem is for best experience, i want to load animations on client so it wont wait for server to replicate to clients, i still want to make it replicate
well i mean its not possible for it to show animation for everyone without remote events or just use server sided scripts the choice is your either chose
1.Only Server Sided Scripts
2.Remote Events
3.Only For One Player
also i didnt quite understand by this can you clearify this please thanks
also you made a mistake here this is the fixed one:
local Animations = function(Humanoid,StandHRP)
local animator = Humanoid.Animator
print(animator)
wait(1)
return
{
["NOTHING"] = animator:LoadAnimation(StandHRP.Nothing),
["IDLE"] = animator:LoadAnimation(StandHRP.Idle),
["BLOCK"] = animator:LoadAnimation(StandHRP.Block),
["LPUNCH"] = animator:LoadAnimation(StandHRP.LeftPunch),
["RPUNCH"] = animator:LoadAnimation(StandHRP.RightPunch),
["SPUNCH"] = animator:LoadAnimation(StandHRP.StrongPunch),
["SKICK"] = animator:LoadAnimation(StandHRP.StrongKick),
["TIMESTOP"] = animator:LoadAnimation(StandHRP.TS),
["STANDJUMP"] = animator:LoadAnimation(StandHRP.StandJump),
["ROAD-ROLLER"] = animator:LoadAnimation(StandHRP.Roller),
["POSE"] = animator:LoadAnimation(StandHRP.Pose1),
["ATTACK-POSE"] = animator:LoadAnimation(StandHRP.AttackPose),
["ROLL"] = animator:LoadAnimation(StandHRP.Roll),
}
end
return Animations
If an Animator is a descendant of a Humanoid or AnimationController in a Player’s Character then animations started on that Player’s client will be replicated to the server and other clients.
And I tried both humanoid and animator same effect, so its not a fix
hmmm interesting… well i think it may be a roblox studio issue you can infact remake the script because sometimes remaking a script does do the trick also what are you trying to make? also does it gives ANY ANY Sort of error when you test it??
I just want it to replicate to server and i can’t remake the whole game, its just doesn’t replicate