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 4 years ago
Edited by Leamir 4 years ago
01local billboardgui =
02game:GetService("ServerStorage"):WaitForChild("BillboardGui")
03 
04 game.Players.PlayerAdded:Connec(function(player)
05 
06  player.CharacterAdded:Connect(function(character)
07 
08   if player.Name == "milgamer5" then
09    local clonedgui = billboardgui:Clone()
10    clonedgui.TextLabel.Text = "Developer"
11    clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255,255,0)
12    clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
13   end
14 
15end) -- here the problem
0
Please format the code. The error means that there's atleast one "end" missing in the script. radiant_Light203 1166 — 4y
0
ok let me see milgamer5 5 — 4y
0
oh tysm it worked milgamer5 5 — 4y

1 answer

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

01local billboardgui =
02game:GetService("ServerStorage"):WaitForChild("BillboardGui")
03 
04 game.Players.PlayerAdded:Connect(function(player) -- And you also misspelled Connect
05 
06  player.CharacterAdded:Connect(function(character)
07       if player.Name == "milgamer5" then
08        local clonedgui = billboardgui:Clone()
09        clonedgui.TextLabel.Text = "Developer"
10        clonedgui.TextLabel.TextColor3 = Color3.fromRGB(255,255,0)
11        clonedgui.Parent = game.Workspace:WaitForChild(player.Name).Head
12       end
13    end) -- You forgot to put an end here!
14end)
Ad

Answer this question