So, i'm making a combo script, and i'm trying to fix this issue i've been having for the last 30 minutes, it seems so simple but yet i cant find anyone else with the same issue. Here is my script:
local damage local AttackDebounce local plr = game.Players.LocalPlayer
game.ReplicatedStorage.CombatEvent.OnServerEvent:Connect(function(player,index) AttackDebounce = false local character = game.Workspace:WaitForChild(player.Name) if not character then return end
local AnimList = {
"PunchLeft",
"PunchRight",
"Kick"
}
local animToPlay = script.Animations:FindFirstChild(AnimList[index])
local LoadedAnimation = cha racter.Humanoid:LoadAnimation(animToPlay)
LoadedAnimation:Play()
wait(1)
game.ReplicatedStorage.CombatEvent:FireClient(player)
end)
Its connected to a CombatCilent Script in StarterCharacterScripts, and that doesnt seem to be giving any errors. Can anyone help? (And no, the script doesnt start at local AnimList, im new to this website and Idk how to fix it. Also after game.ReplicatedStorage.CombatEvent.OnServerEvent:Connect(function(player,index) there is an indent for the rest of the script until end)

1 comment
hey thanks sorry im really new to this whole coding stuff, thanks for the help!!