#idk why but my m1 animation stops working

1 messages · Page 1 of 1 (latest)

errant oriole
#

When ever someone else joins the game my animations stop working and fix when they leave'

#

I had a more efficent way aswell like this

glad pasture
#

start by loading all your animations beforehand

#
local animator = Char.Humanoid:WaitForChild("Animator")
local animations = script.Parent.Animations

local anim1 = animations.A1
local anim2 = animations.A2
local anim3 = animations.A3
local anim4 = animations.A4
local anim5 = animations.A5
#

alternatively you could add all the tracks to a table and have it loop and load

#
local animator = Char.Humanoid:WaitForChild("Animator")
local animations = script.Parent.Animations:GetChildren()
local anims = {}

for _,i in animations do
  local value = animator:LoadAnimation(i)
  table.insert(anims,value)
end
#

and then in the combos code just index instead of checking every single time

#
if action == "ComboUpdate" then
  Combo.Value += 1
  anims[Combo.Value]:Play()
  game.Debris:AddItem(animation,2)
end
glad pasture
#
local plr = game.Players.LocalPlayer
local animator, animations, anims

plr.CharacterAdded:Connect(function(Char)
  animator = Char.Humanoid:WaitForChild("Animator")
  animations = script.Parent.Animations:GetChildren()
  anims = {}

  for _,i in animations do
    local value = animator:LoadAnimation(i)
    table.insert(anims,value)
  end
end)
cerulean narwhal
#

i'll say that

errant oriole
#

@glad pasture still didnt fix the problem

errant oriole
#

Also when i changed it to this which works with another fist m1 combat i made and it still breaks also it doesnt work when i punch someone

spare snowBOT
#

studio** You are now Level 1! **studio

glad pasture
glad pasture
errant oriole
glad pasture
#

always handle animations on the client

#

otherwise it's just adding strain on the server

#

and if you're worried about exploits, animations are always very exploitable

errant oriole
#

ok

#

ty