#How do i make a combat system
11 messages · Page 1 of 1 (latest)
Then your title is incorrect "don't know why my combat system won't work"
Yes you misspelled the title
Basically, when you say "my combat system" means that you own one
The correct title would be
"How can I make a combat system with 4 animations"
So you will have to use 4 animations in a table
You can name them with numbers such as Anim1 Anim2 ...
Then you will loop through the children to create a combo with a combo order
local combo = 1
local debounce = false
local humanoid = ...
local animFolder = ...
local function PlayCombo()
if debounce then return end
debounce = true
local anim = assert(animFolder:FindFirstChild(`Anim{combo}`), "Can't find combo anim")
local animator = assert(humanoid:FindFirstChildOfClass("Animator"), "No animator")
local track = animator:LoadAnimation(anim)
track:Play()
track.Completed:Wait()
combo += 1
combo = ((combo - 1) % #animFolder:GetChildren()) + 1
debounce = false
end
You can use a function like that to play your combo