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

Can someone help with my BillboardGui Overhead Issue?

I'm stuck on why the TextLabel isn't appearing over my head, I want it so when I click on the TextButton a Text Label appears above his head indicating what he is in the game. I currently have this in a script Under StarterGui as the whole gui system is built under a script. So the textButton gets created meaning this script should work but I don't know what is causing it to fail.

local vPlayer = game.Players.LocalPlayer

script.Parent.ClassPicker.Fighter.Fighter.MouseButton1Down:connect(function(p)
	
if p then
local bGui = Instance.new("BillboardGui")
bGui.Parent = vPlayer.Character.Head
bGui.Name = "ClassName"
local cL = Instance.new("TextLabel")
cL.Parent = bGui
cL.Position = UDim2.new(-0.125,0,-1.1,0)
cL.Size = UDim2.new(1.25,0,1.75,0)	
end	
end)

8 comments

0

Whats vPlayer? Any errors?

0

When the player Clicks on the TextButton it is suppose to link to the function I believe, Which would just make sure a character exist if i'm correct?

0

And no there are no errors with the coding above. That is why it is so difficult to find the error.

0

I dont think a UIButton has any arguments, thus, p will be nil. Anyway, if a player can click a button, there is a character. No doubt

0

Even without the "if" statement it still has no effect, Maybe it has to do with the Position and Size of the Frame? Because the Gui is currently under "Head" when the game launches.

0

Run it and check in your character model. Its probably a scale issue on the BBGui

0

Ah I didn't give the BBGui itself a size. Stupid on my part, Thank you for the help on that, Much appreciated!

0

Noproblemo.

1 answer

Since we solved it in the comments, would you mind accepting this answer?

The problem was a scale issue with the bbgui.

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