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

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

Asked by 3 years ago
Edited by Leamir 3 years 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 1166 — 3y
0
ok let me see milgamer5 5 — 3y
0
oh tysm it worked milgamer5 5 — 3y

1 answer

Log in to vote
3
Answered by
rabbi99 714 Moderation Voter
3 years 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