Unable to create billboard guis with instancing

For some reason when I add a billboard gui to the root part of a player’s character, it’s removed shortly afterward. Here’s my code:

function change(obj)
	return function(props)
		for property, value in pairs(props) do
			local function changeProp()
				obj[property] = value
			end
			coroutine.wrap(changeProp)()
		end
	end
end

function billBoard(adornee, txt)
	local gui = Instance.new("BillboardGui", adornee)
	change(gui){
		["Enabled"] = true,
		["Adornee"] = adornee,
		["MaxDistance"] = 30,
	}
	local label = Instance.new("TextLabel", gui)
	change(label){
		["BackgroundTransparency"] = 1,
		["Text"] = txt,
		["Font"] = Enum.Font.Antique,
		["TextSize"] = 30,
		["TextColor3"] = Color3.new(1, 0, 0),
	}
	gui.Enabled = true
	return gui
end
1 Like

It is probably because you returned the Gui.

I tried that, it still doesn’t work. :confused: