This is my script that wont work for some reason
local rp = game:GetService("ReplicatedStorage") local Combat = rp:WaitForChild("Combat") local Animations = script:WaitForChild("Animations") local anims = { Animations:WaitForChild("Kick") Animations:WaitForChild("Left") Animations:WaitForChild("Right") Animations:WaitForChild("Gut") } Combat.OnServerEvent:Connect(function(player,count) local Character = player.Character local Humanoid = Character:WaitForChild("Humanoid") local attack = Humanoid:LoadAnimations(anims[count]) attack:Play() end)
Im trying to run a animation nothing has errors the errors are Error: (12,1) Syntax error: Expected identifier when parsing expression, got '}' and Error: (9,3) Syntax error: Expected '}' (to close '{' at line 7), got 'Animations'
The tables, should have commas (,) to separate the contents.
For example:
--Wrong Table example: local table = { 1 2 3 4 }
--Correct Table example: local table = { 1, 2, 3, 4 }
Hope this help you.
Have an excellent day