#Need help with where to place this script.

23 messages · Page 1 of 1 (latest)

still sequoia
#

Got this script that gives everyone the same animations for running, jumping, etc. I'm pretty sure the code is good, let me know if it isn't.. but I also don't know where I should put this. I've tried ServerScriptService, StarterCharacterScripts, StarterPlayerScripts, and none worked. If you respond, please ping me!


local function onCharacterAdded(character)
    -- Get animator on humanoid
    local humanoid = character:WaitForChild("Humanoid")
    local animator = humanoid:WaitForChild("Animator")

    -- Stop all animation tracks
    for _, playingTrack in pairs(animator:GetPlayingAnimationTracks()) do
        playingTrack:Stop(0)
    end

    local animateScript = character:WaitForChild("Animate")
    animateScript.run.RunAnim.AnimationId = "rbxassetid://619528716"
    animateScript.walk.WalkAnim.AnimationId = "rbxassetid://973767371"
    animateScript.jump.JumpAnim.AnimationId = "rbxassetid://2510236649"
    animateScript.idle.Animation1.AnimationId = "rbxassetid://782841498"
    animateScript.idle.Animation2.AnimationId = "rbxassetid://782845736"

    -- Adjust animation weights for idle animations
    animateScript.idle.Animation1.Weight = 3  -- Set a higher weight for Animation1
    animateScript.idle.Animation2.Weight = 1

    animateScript.fall.FallAnim.AnimationId = "rbxassetid://892267521"
    animateScript.swim.Swim.AnimationId = "rbxassetid://837012509"
    animateScript.swimidle.SwimIdle.AnimationId = "rbxassetid://707894699"
    animateScript.climb.ClimbAnim.AnimationId = "rbxassetid://973773170"
end

local function onPlayerAdded(player)
    player.CharacterAppearanceLoaded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)```

Get back to me if you can!
#

Extra image if needed

shut rover
#

starter player

#

no

#

starter character

still sequoia
#

Thats what I figured, its a script that effects the physical character.

shut rover
still sequoia
#

Didnt work

still sequoia
shut rover
#

oh

#

ok so when u add a rig or go in game and click on ur character in workspace there is a script called animate which does all of that already

still sequoia
#

oh yea that

#

wait so

#

lemme ss it

still sequoia
# shut rover

So I should put it all in here? And then switch around the animation IDs to what I want?

shut rover
#

yes

#

and the ones parented to script

still sequoia
#

Alright, I'll try that, thank you very much.

shut rover
#

np lmk if u need help

still sequoia
shut rover
#

If you click on the arrow next to animate there will be some more ids