Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Expected 'end' (to close 'function' at line 10), got <eof>?

Asked by 3 years ago

Where am I supposed to put my ends?

ServerScriptService.CombatHandler:62: Expected 'end' (to close 'function' at line 10), got <eof>; did you forget to close 'then' at line 47?

local Remote = game.ReplicatedStorage:WaitForChild("Combat")

local TweenService = game:GetService("TweenService")

local Anims = script:WaitForChild("Anims")
local Sounds = script:WaitForChild("Sounds")
local FX = script:WaitForChild("FX")


Remote.OnServerEvent:Connect(function(Player,Action,Combo)
    local Char = Player.Character
    local Hum = Char:WaitForChild("Humanoid")
    local HumRP = Char:WaitForChild("HumanoidRootPart")

    local RightArm = Char:WaitForChild("Right Arm")
    local LeftArm = Char:WaitForChild("Left Arm")
    local RightLeg = Char:WaitForChild("Right Leg")

    local Combo1Loaded = Hum:LoadAnimation(Anims.Combo1)
    local Combo2Loaded = Hum:LoadAnimation(Anims.Combo2)
    local Combo3Loaded = Hum:LoadAnimation(Anims.Combo3)
    local Combo4Loaded = Hum:LoadAnimation(Anims.Combo4)


    delay(0.55,function()
        Remote:FireClient(Player)   
end)

    local Folder = Instance.new("Folder",workspace)
    Folder.Name = Player.Name.." Hitbox"
    game.Debris:AddItem(Folder,0.5)

    delay(0.22,function()   

        if Combo == 1 then

        Combo1Loaded:Play() 

    elseif Combo == 2 then

        Combo2Loaded:Play() 

    elseif Combo == 3 then


        Combo3Loaded:Play()     
    elseif Combo == 4 then

        Combo4Loaded:Play() 

        end
end)

1 answer

Log in to vote
0
Answered by
nlurn 15
3 years ago

You didn't close your function at line 10

0
it's more likely the function in delay at line 25 and 33 imKirda 4491 — 3y
Ad

Answer this question