Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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 

3 comments

0

Please format the code. The error means that there's atleast one "end" missing in the script.

0

ok let me see

0

oh tysm it worked

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.