Solved it myself

I can just create a billboard GUI without scripting with a text label and it works 100 percent. But in this script it creates, the text label too, same properties as expected, but it just doesn't visually show up! It's a parent of the player's head.

game.Players.PlayerAdded:Connect(function(plr)
	wait(0.5)
	local titles = Instance.new("Folder", plr)
	titles.Name = "Data"
	local titlef = Instance.new("StringValue", titles)
	titlef.Name = "Title"
	local function res()
		titlef.Changed:Connect(function()
		print("Changed: "..titlef.Value)
		if titlef.Value ~= "" then
			local rep = game.ReplicatedStorage.Shop.Titles[titlef.Value]
			local color = rep.ColorValue
			local char = plr.Character
			local head = char.Head
			if not head:FindFirstChildOfClass("BillboardGui") then
				print("Haha")
				-- problems below! It doesn't show up when I play!
				local bb = Instance.new("BillboardGui", head) -- I checked and its in the player's head, works well
				local ss = Instance.new("ScreenGui", bb) -- same with this
				local tx = Instance.new("TextLabel", ss) -- and this too
				tx.BackgroundTransparency = 1 -- works, just in properties
				tx.TextColor3 = color.Value -- ^
				tx.Text = titlef.Value -- ^^
			end
		end
	end)
end		
	res()
	local c = plr.Character
	c.Humanoid.Died:Connect(function()
		wait(6)
		res()
	end)
end)

2 comments

0

Should I just make one on server storage and clone it into the player??

0

^ might as well try that