Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone help with my BillboardGui Overhead Issue?

Asked by 7 years ago
Edited 7 years ago

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

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
7 years ago

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

The problem was a scale issue with the bbgui.

Ad

Answer this question