How can I force users to have the default idle animation?

Since my plane spawners have a thing that prevents them from spawning in things, certain animation packs make it go into the ground or too high up. How can I force the default idle?

2 Likes

You can set the Animation to Standard in the Game Settings menu, but this will force all player animations to be the default animations.

3 Likes

Is there any way so that only the idle changes?

1 Like

Fork the Animate script from a player (perhaps you) while having all animations unequipped.

Then insert the LocalScript into StarterCharacterScripts and insert the following code into it at the top:

repeat wait() until script.Parent.ClassName ~= "StarterCharacterScripts"

script.Name = "LoadingAnimate"

for _,thing in pairs(script.Parent:GetChildren()) do
if thing.Name == "Animate" and (thing.ClassName == "LocalScript" or thing.ClassName == "Script") then
thing:Destroy()
end
end

script.Name == "Animate"

Then, move to the animations table and set the Idle animation to rblxassetid://0.

Let me know how it goes.

EDITS: Fixed code bugs.

Where is the animations table?

There’s a way to do this without forking anything, which you shouldn’t ever do unless you’re making major system changes or you can’t make changes at all without forking. The idea is to use the HumanoidDescription system: grab their current description, zero out the idle and then apply it back.

local Players = game:GetService("Players")

local function onPlayerAdded(player)
    player.CharacterAppearanceLoaded:Connect(function (character)
        local humanoid = character:WaitForChild("Humanoid")
        local description = humanoid:GetAppliedDescription()

        description.IdleAnimation = 0

        humanoid:ApplyDescription(description)
    end)
end

Players.PlayerAdded:Connect(onPlayerAdded)
for _, player in ipairs(Players:GetPlayers()) do
    onPlayerAdded(player)
end

Something like this should take care of your issues. 0 will default a field.

* BEWARE: CharacterAppearanceLoaded may not fire in some circumstances. I don’t know if the issue was patched or not (ahem ahem, character loading events that was delayed for a whole year with no communication), so be wary of the edge case in which no equipped items will not fire this event.