ServerScriptService.CoreScript (Server):44: Expected 'end' (to close 'function' at line 8), got 'elseif'; did you forget to close 'then' at line 35? I just keep getting this error and I have no clue what to do
oreevent.OnServerEvent:Connect(function(plr, eventtype, Arg1)
(not relevant)
for i,v in pairs(characters:GetChildren()) do
local CharacterName = Arg1
if v.Name == CharacterName and not v:FindFirstChild("GamepassId") then
plr.CurrentCharacter.Value = CharacterName
elseif v.Name == CharacterName and v:FindFirstChild("GamepassId") and mps:UserOwnsGamePassAsync(plr.UserId, v.GamePassId.Value) then
plr.CurrentCharacter.Value = CharacterName
end
end
local CharacterName = Arg1
if characters[CharacterName]:FindFirstChild("Weapon") then
coreevent:FireClient(plr, "ToolbarDisable")
local weapon = characters[CharacterName].Weapon:Clone()
weapon.Parent = plr.Character
end
end
elseif eventtype == "Skill" then
local SkillNumber = Arg1
if plr.CurrentCharacter.Value == "Gojo" then
CombatModule.Gojo(plr, SkillNumber)
elseif plr.CurrentCharacter.Value == "Toji" then
CombatModule.Toji(plr, SkillNumber)
elseif plr.CurrentCharacter.Value == "Yuji" then
CombatModule.Yuji(plr, SkillNumber)
end
end
end)
** You are now Level 1! **