Pretty self explanatory. Here is my script, I want to get the humanoid to load the animations but I dont know how to. This script is in ServerScriptStorage
local MyRoot
local re = game:GetService("ReplicatedStorage")
--Variables
local Event
local state = nil
local idleAnim1
local idleAnim2
players = game:GetService("Players")
-- Animations
local idle = re:WaitForChild("Assets").Animations.Idle
local walk = re:WaitForChild("Assets").Animations.Walk
local berserkWalk = re:WaitForChild("Assets").Animations.WalkBerserk
local berserkIdle = re:WaitForChild("Assets").Animations.IdleBerserk
berserkWalk = humanoid:LoadAnimation(berserkWalk)
berserkIdle = humanoid:LoadAnimation(berserkIdle)
-- Check for movement
Event = humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(function()
local magnitude = humanoid.MoveDirection.Magnitude
idleAnim1 = humanoid:LoadAnimation(idle)
if magnitude <= 0.1 and state ~= "idle" then
state = "idle"
if humanoid.Parent.Name == "BerserkMorph" then
berserkIdle:Play()
else
idleAnim1:Play()
end
if idleAnim2 then
idleAnim2:Stop()
end
if berserkWalk then
berserkWalk:Stop()
end
elseif state ~= "other" then
state = "other"
idleAnim2 = humanoid:LoadAnimation(walk)
if player.Character.Name == "BerserkMorph" then
berserkWalk:Play()
else
idleAnim2:Play()
end
if idleAnim1 then
idleAnim1:Stop()
if berserkIdle then
berserkIdle:Stop()
end
end
end
end)