#How do I make it so when Rage = true, his walking and idle are different. and how do i stop the idle

13 messages · Page 1 of 1 (latest)

warm forum
#

I'm making a special boss character who has a rage mode when at 1/4 hp, but, ive tried making it so his idle stops when he plays the rage animation, and also i wanna make it so his idle and walk animations change when this starts.

#

As i'm confused

#

I also wanna change his attack animation

uneven sonnet
#

You could make 2 animations in a folder somewhere named "Currents" and refer to those within the folder as the animations within the script

#

On top of that you could store your base and rage animations within the same folder and change 'currents'.AnimationId to whatever animationid you need

#

that's what I do, It's probably not the most effecient

#

but it works

primal mortar
#

@warm forum

#

yeah, i can help you with that! here's a script that should do what you're asking for:

local boss = script.Parent -- assuming this script is a local script attached to the boss character
local humanoid = boss:WaitForChild("Humanoid")
local animator = humanoid:FindFirstChild("Animator")

local rageMode = false
local rageThreshold = boss.MaxHealth * 0.25

local idleAnim = "Idle" -- name of the idle animation
local walkAnim = "Walk" -- name of the walk animation
local rageAnim = "Rage" -- name of the rage animation
local rageIdleAnim = "RageIdle" -- name of the rage idle animation
local rageWalkAnim = "RageWalk" -- name of the rage walk animation

humanoid.HealthChanged:Connect(function(health)
if health <= rageThreshold and not rageMode then
rageMode = true
animator:LoadAnimation(animator:FindAnimation(rageAnim)):Play()
animator:StopAnimation(animator:FindAnimation(idleAnim))
animator:StopAnimation(animator:FindAnimation(walkAnim))
end
end)

animator.StateChanged:Connect(function(state)
if state == Enum.HumanoidStateType.Idle and rageMode then
animator:LoadAnimation(animator:FindAnimation(rageIdleAnim)):Play()
elseif state == Enum.HumanoidStateType.Walking and rageMode then
animator:LoadAnimation(animator:FindAnimation(rageWalkAnim)):Play()
end
end)

this script assumes you have already set up the animations in the animator and have named them as specified in the script. it also assumes that the boss character has a humanoid object as a child.

note that this script stops the idle and walk animations when the rage mode is activated, and plays the rage animation instead. when the boss is idle or walking during rage mode, it plays the corresponding rage idle or walk animation. you can adjust the script to fit your specific needs.

warm forum
#

Oh god

#

im an idiot

#

Forgot to mention that this is for a multiplayer game @primal mortar

primal mortar
#

oh