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
Whats vPlayer? Any errors?
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?
And no there are no errors with the coding above. That is why it is so difficult to find the error.
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
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.
Run it and check in your character model. Its probably a scale issue on the BBGui
Ah I didn't give the BBGui itself a size. Stupid on my part, Thank you for the help on that, Much appreciated!
Noproblemo.