Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
1

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

Asked by 2 months ago
Edited by Leamir 2 months ago
local billboardgui = 
game:GetService("ServerStorage"):WaitForChild("BillboardGui")

 game.Players.PlayerAdded:Connec(function(player)

  player.CharacterAdded:Connect(function(character)

   if player.Name == "milgamer5" then
    local clonedgui = billboardgui:Clone()
    clonedgui.TextLabel.Text = "Developer"
    clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255,255,0)
    clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
   end

end) -- here the problem 
0
Please format the code. The error means that there's atleast one "end" missing in the script. radiant_Light203 390 — 2mo
0
ok let me see milgamer5 5 — 2mo
0
oh tysm it worked milgamer5 5 — 2mo

1 answer

Log in to vote
3
Answered by
rabbi99 535 Moderation Voter
2 months ago

You forgot to put an end and you also misspelled Connect. These are small problems, next time you should carefully read your script.

local billboardgui = 
game:GetService("ServerStorage"):WaitForChild("BillboardGui")

 game.Players.PlayerAdded:Connect(function(player) -- And you also misspelled Connect

  player.CharacterAdded:Connect(function(character)
       if player.Name == "milgamer5" then
        local clonedgui = billboardgui:Clone()
        clonedgui.TextLabel.Text = "Developer"
        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255,255,0)
        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
       end
    end) -- You forgot to put an end here!
end)
Ad

Answer this question