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

why this script makes a billboard gui that doesnt even show up?

so the script below inserts a billboard gui into every head in the game, then inserts a textlabel into it. it works, the gui and textlabel is in the place but it doesn't show up in the game and im not getting any errors. any help appreciated.

while true do
	for i,v in pairs(game.Workspace:GetDescendants()) do
		if v.Name == "Head" then
			local gui = Instance.new("BillboardGui",v)
			gui.AlwaysOnTop = true
			local text = Instance.new("TextLabel",gui)
			text.BackgroundTransparency = 1
			text.TextScaled = true
			text.TextStrokeTransparency = 0
			text.TextStrokeColor3 = Color3.fromRGB(0,0,0)
			text.Font = Enum.Font.Arcade
			text.TextColor3 = Color3.fromRGB(255,0,0)
			text.Text = "."
			text.Size = UDim2.new(0,10 , 0,10)
		end
	end
	wait(10)
end

6 comments

2

The adornee of the Gui is not set to the player's head.

0

oh i have no idea what adornee is i guess im just gonna read about it

0

oh i have no idea what adornee is i guess im just gonna read about it

0

oh i have no idea what adornee is i guess im just gonna read about it

0

Is This A Local Script?

0

Adornee is the part that it will appear above, you set the position and size, but position in reference to what? That's what Adornee sets.

1 answer

There Is Another Way, First Make A Part Then Insert A Bill Board Gui Into The Part So You Can Customize It Easily Then After You Got The Look You Want Remove The BillBoardgui From the Part And Add It Into Replicated Storage After That Create A Script Place The Script In ServerScriptService Then Place This Code In It:

local replicated_storage = game:GetService("ReplicatedStorage")
local billboard = replicated_storage:WaitForChild("BillboardGui")


game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
		

local gui = billboard:Clone()
gui.StudsOffset = Vector3.new(0,3,0) 
  
  gui.Parent = game.Workspace:WaitForChild(plr.Name).Head

		
		
		
		
		
	end)
end)

This Should Work Hope This Helps!

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