A textlabel made using a serversidescript doesnt show up

So basically i got this script:

game.Players.PlayerAdded:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait()
	local head = character:WaitForChild("Head")
	local BillboardGui = Instance.new("BillboardGui")
	BillboardGui.Parent = head
	BillboardGui.AlwaysOnTop = true
	BillboardGui.StudsOffsetWorldSpace = Vector3.new(0, 5, 0)
	BillboardGui.Size =  UDim2.new(0, 100, 0, 50)
	local frame = Instance.new("Frame")
	frame.ZIndex = 2
	frame.Parent = BillboardGui
	frame.Visible = true
	frame.Size = UDim2.new(0, 100, 0, 50)
	local textlabel = Instance.new("TextLabel")
	textlabel.ZIndex = 1
	textlabel.Parent = frame
	textlabel.Size = UDim2.new{0, 200,0, 50}
	textlabel.Visible = true
end)

and what it does is, it makes a billboard gui on the top of the player’s head, and inside it, is a frame and inside the frame is a textlabel, but even though the textlabel, frame and billboard are all enabled and are visible. The textlabel never shows up. Why?

2 Likes
game.Players.PlayerAdded:Connect(function(player)
	local character = player.Character or player.CharacterAdded:Wait()
	local head = character:WaitForChild("Head")
	local BillboardGui = Instance.new("BillboardGui")
	BillboardGui.Parent = head
    BillboardGui.Adornee = head
	BillboardGui.AlwaysOnTop = true
	BillboardGui.StudsOffsetWorldSpace = Vector3.new(0, 5, 0)
	BillboardGui.Size =  UDim2.new(0, 100, 0, 50)
	local frame = Instance.new("Frame")
	frame.ZIndex = 2
	frame.Parent = BillboardGui
	frame.Visible = true
	frame.Size = UDim2.new(0, 100, 0, 50)
	local textlabel = Instance.new("TextLabel")
	textlabel.ZIndex = 1
	textlabel.Parent = frame
	textlabel.Size = UDim2.new(0, 200,0, 50)
	textlabel.Visible = true
end)
1 Like

thank you! it worked…,.,.,…,.,

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.