Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

This animation handler works in studio but not in game,how can fix so the server is able to play it?

Asked by 3 years ago
Edited 3 years ago

So how can I make it work? NOTE: I'm NOT the owner of the game I want it inside.

game.Players.PlayerAdded:connect(function(player)
        player.CharacterAdded:connect(function(character)
player.Character.Animate.fall.FallAnim.AnimationId = "http://www.roblox.com/asset/?id=5171959206" --fall--
player.Character.Animate.idle.Animation1.AnimationId = "http://www.roblox.com/asset/?id=5171744485" --idle--
player.Character.Animate.idle.Animation2.AnimationId = "http://www.roblox.com/asset/?id=5171744485" --idle2--
player.Character.Animate.jump.JumpAnim.AnimationId = "http://www.roblox.com/asset/?id=5171912027" --jump--
player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=5171886191" --walk/run--
end)
end)



1 answer

Log in to vote
0
Answered by
blazar04 281 Moderation Voter
3 years ago

Click play in studio, go to the explorer window, look inside your character model, and copy the "Animate" script. Click the stop button and paste the script into StarterCharacterScripts. By copying the script with the name "Animate" and putting it in StarterCharacterScripts, the default Animate script will be replaced. You can now modify the Animate script and put in your own asset ids.

There should be a part that looks like this:

local animNames = { 
    idle =  {   
                { id = "http://www.roblox.com/asset/?id=507766666", weight = 1 },
                { id = "http://www.roblox.com/asset/?id=507766951", weight = 1 },
                { id = "http://www.roblox.com/asset/?id=507766388", weight = 9 }
            },
    walk =  {   
                { id = "http://www.roblox.com/asset/?id=507777826", weight = 10 } 
            }, 
    run =   {
                { id = "http://www.roblox.com/asset/?id=507767714", weight = 10 } 
            }, 
    swim =  {
                { id = "http://www.roblox.com/asset/?id=507784897", weight = 10 } 
            }, 
    swimidle =  {
                { id = "http://www.roblox.com/asset/?id=507785072", weight = 10 } 
            }, 
    jump =  {
                { id = "http://www.roblox.com/asset/?id=507765000", weight = 10 } 
            },--- ...

Replace those asset ids with your custom animation asset ids.

0
thanks for helping!! DaNinjaRoblox23 7 — 3y
Ad

Answer this question