You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve? Keep it simple and clear!
I’m trying to make a sword that can go into combos and loop.
- What is the issue? Include screenshots / videos if possible!
The code is stopping before the animations play. No errors in output.
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve added prints to pinpoint where it’s stopping. I’ve also tried different ways of running the animations.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Activation script:
local function activated()
if isswinging == false then
isswinging = true
if swingindex >= 3 then
swingindex = 1
else
swingindex += 1
end
print(swingindex)
for i, v in pairs(swingsloaded) do
print("for loop")
if i == swingindex then
print("i is index")
v:Play()
print(v.Name)
print("played")
v.Ended:Connect(function()
isswinging = false
end)
end
end
previousindex = swingindex
task.wait(2.5)
if swingindex == previousindex then
swingindex = 0
end
end
end
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.