Hello people, so I’m new to the forum so I really don’t know if this the right category, but I really need some help here.
So, regarding in-game gameplay, scripts, and animations, the animations do not seem to play for other players. At the moment, my script works perfectly well, and it does indeed play the animation, but the thing is, it does not play for other players. In Roblox Studio the script also works perfectly well and smoothly as well as in game. But for some reason when you play the game with other players, the animations do not show for mine or the other player’s screen.
Note that I have a Local Script inserted into the rig, and it does work.
I’ve tried changing “local” to “script.”, I’ve tried moving the root part to other parts of the body, and I’ve tried rewriting the entire script. I thought of reuploading the animations to ROBLOX, but it still seems to yield the same results. This also gives the same result if you play with more than 2 players, and it still shows the same issue for all the players.
This is a script I put into a custom rig.
The script I used is provided here:
local animation = Instance.new(“Animation”)
local character = Player
local humanoid = character.Humanoid
humanoid.Running:connect(function(state)
if state > 3 then
if CurrentState ~= “Running” then
CurrentState = “Running”
if animations[1] ~= "" then
animation.AnimationId = "http://www.roblox.com/Asset?ID=04540187205"
playAnimation(character,animation)
end
end
else
if CurrentState ~= "Idle" then
CurrentState = "Idle"
if animations[2] ~= "" then
local ActiveTracks = humanoid:GetPlayingAnimationTracks()
For future reference, please put everything into a codeblock and indent it properly for other people to read it efficiently.
local animation = Instance.new(“Animation”)
local character = Player
local humanoid = character.Humanoid
humanoid.Running:connect(function(state)
if state > 3 then
if CurrentState ~= “Running” then
CurrentState = “Running”
if animations[1] ~= "" then
animation.AnimationId = "http://www.roblox.com/Asset?ID=04540187205"
playAnimation(character,animation)
end
end
else
if CurrentState ~= "Idle" then
CurrentState = "Idle"
if animations[2] ~= "" then
local ActiveTracks = humanoid:GetPlayingAnimationTracks()
for _,v in pairs(ActiveTracks) do
v:Stop()
end
animation.AnimationId = “http://www.roblox.com/Asset?ID=04540189200”
playAnimation(character,animation)
end
end
end
end)
With that said, I believe there are a few variables that need to be defined for us to help you. Please give us what you define animations and playAnimation.
There are two things that come to mind for me.
Either the animation hasn’t been approved by mods, or, the animation is client side only. You’ll have to load the animation on the server for it to tell all the other clients what is happening.