Ad
Log in to vote
0

How do I make it so StarterCharacter has custom anims?

Asked by 8 days ago

Hey! So I've been trying to make a mage or something close to it and I can't seem to find a way to make my Mage StarterCharacter have different animations from the other characters (Run/walk, jump, idle, etc)

local animNames = { 
    idle =  {   
        { id = "http://www.roblox.com/asset/?id=6753601536", weight = 1 },
        { id = "http://www.roblox.com/asset/?id=6753601536", weight = 1 },
        { id = "http://www.roblox.com/asset/?id=6753601536", weight = 9 }
            },
    walk =  {   
        { id = "http://www.roblox.com/asset/?id=6753646173", weight = 10 } 
            }, 
    run =   {
        { id = "http://www.roblox.com/asset/?id=6753646173", weight = 10 } 
            }, 
    jump =  {
        { id = "http://www.roblox.com/asset/?id=6753680952", weight = 10 } 
            }, 
    fall =  {
        { id = "http://www.roblox.com/asset/?id=6753712335", weight = 10 } 
            }, 
-- Only the important part of the LocalScript

When I put my LocalScript with anims in StarterCharacterScripts it will work with every single startercharacter

1 answer

Log in to vote
0
Answered by 8 days ago
Edited 6 days ago

The script should be called Animate & placed in StarterPlayer.StarterCharacterScripts. This will override the default script used for animations.

If you're having custom animations, that's where code blocks come in. You create if-statements on player teams & other definitions. Depending on the response of those if-statements, you can modify/change the animation id in the table.

If this isn't happening in real-time (because I haven't tested the script myself), there's always a workaround but I wouldn't worry about it.

local PlayersService = game:GetService("Players")

if PlayersService.LocalPlayer.Team.Name == "TeamName" then
    animNames["idle"]["id"] = "rbxassetid://0"
end
0
It's the thing that I'm not the brightest with scripts, and I need it so custom StarterCharacter has custom Anims, because if I put an animate script in startercharacterscripts It will put every startercharacter to have the same anim qMrSpooky 18 — 7d
0
I updated it with an example TheLuminent 970 — 6d
Ad

Answer this question