llama-3.3-70b-instruct· Meta LMArena Human Preference 140K
131520090961701 use this also when i walk it resets to custom idle
- User
131520090961701 use this also when i walk it resets to custom idle
- Assistant
Here's an updated script that forces the specified idle animation ID (
131520090961701) and prevents resets to custom idle animations when walking or standing still. It actively monitors the animation state and corrects it as needed.Script Code
-- == CONFIG: Set your idle animation ID == local IDLE_ANIMATION_ID = "rbxassetid://131520090961701" -- ================================================= local Player = game:GetService("Players").LocalPlayer local Character = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Character:WaitForChild("Humanoid") local AnimateScript = Character:WaitForChild("Animate") -- Function to set and monitor the idle animation local function setupIdleAnimation() local IdleAnimationObject = AnimateScript:WaitForChild("idle") local IdleTrack = IdleAnimationObject:FindFirstChildOfClass("Animation") if not IdleTrack then warn("Idle animation track not found. Creating one.") IdleTrack = Instance.new("Animation") IdleTrack.Name = "Animation" IdleTrack.Parent = IdleAnimationObject end -- Set the idle animation ID and monitor for changes local function setIdleId() if IdleTrack.AnimationId ~= IDLE_ANIMATION_ID then IdleTrack.AnimationId = IDLE_ANIMATION_ID -- Restart animation to apply changes local IdleController = IdleAnimationObject:FindFirstChildOfClass("AnimationController") if IdleController then IdleController:Stop() IdleController:Play() end end end -- Initial set setIdleId() -- Listen for changes to AnimationId and reset if altered IdleTrack:GetPropertyChangedSignal("AnimationId"):Connect(function() if IdleTrack.AnimationId ~= IDLE_ANIMATION_ID then setIdleId() -- Force back to specified ID end end) -- Monitor humanoid state to correct animation when walking or standing Humanoid.StateChanged:Connect(function(oldState, newState) if newState == Enum.HumanoidStateType.Idle then setIdleId() -- Ensure idle animation is correct when standing still elseif newState == Enum.HumanoidStateType.Walking then -- Correct animation when walking (in case it resets) local WalkAnimationObject = AnimateScript:WaitForChild("walk") local WalkTrack = WalkAnimationObject:FindFirstChildOfClass("Animation") if WalkTrack then -- You can set a custom walk animation ID here if needed -- WalkTrack.AnimationId = "rbxassetid://YOUR_WALK_ANIMATION_ID" end end end) end -- Apply to initial character setupIdleAnimation() -- Re-apply on respawn Player.CharacterAdded:Connect(function(newCharacter) task.wait(0.5) -- Wait for character to load Character = newCharacter Humanoid = Character:WaitForChild("Humanoid") AnimateScript = Character:WaitForChild("Animate") setupIdleAnimation() end)How It Works
- The script forces the specified idle animation ID (
131520090961701) and monitors for changes, correcting the animation state as needed. - It listens for humanoid state changes (e.g., walking, standing) to ensure the correct animation plays.
- You can optionally set a custom walk animation ID in the script if needed.
Notes
- This script is designed for R15 avatars. If you need R6 support, let me know.
- Ensure no other scripts are modifying animations, as this could interfere with the desired behavior.
No extra setup needed—just paste and test.
- The script forces the specified idle animation ID (
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.