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

How do you keep a Billboardgui from scaling in size, as you walk close or away ?

Asked by 9 years ago

Everytime I get close to an NPC with a billboardgui, the gui gets smaller as a approach. What am I doing wrong?

I'm using this:

    local frame = game.ServerStorage.MoodFrame:Clone()

    local gui = Instance.new("BillboardGui")
        gui.Parent=npc.Head
        gui.Adornee=npc.Head
        gui.Size=UDim2.new(1,0,1,0)
        gui.StudsOffset=Vector3.new(0,2,0) 
        frame.Parent = gui

Size of the MoodFrame (which I just converted to an Image label) is {0,23},{0,23}

0
This is happening because you're using the scale property of the billboardgui size which point is exactly this. unmiss 337 — 9y
0
it's normal i believe lomo0987 250 — 9y
0
Actually I set scale to 1 and it still changes.. everyone in forum comments says, "use scale to 1 to be 100% of your screen, and that fixes it... I think its broke... JasonTheOwner 391 — 9y
0
I've tried it WITHOUT the scale and it still scales.... very frustrating... JasonTheOwner 391 — 9y
0
Please no comments or answers unless you have a true tested answer. I'm not looking for suggestions at this point, because I've done lots of research. JasonTheOwner 391 — 9y

1 answer

Log in to vote
0
Answered by
sigve10 94
9 years ago

You cant use an offset in the UDim2. The offset resizes, but not the scale.

Don't know what offset is?

The offset is the second number that is shown in the UDim2. Let's say you have this UDim2: {0,1},{2,3} In this UDim2 the 1 and the 3 are both offsets, while the 0 and the 2 are not. I hope this helped.

0
A bit hard to understand, but if you need help, just comment and I will try to explain better. sigve10 94 — 9y
0
Nope doesn't help. Try it yourself and you'll see that doesn't work. JasonTheOwner 391 — 9y
0
I know all about offset and scale - works great in a regular GUI. Billboardgui is completley different . Try it.... If you get some code working I'd love to see it. What I want is the imagelable I put in the GUI to be SMALL as the player is far in the distance, and a I get closer to the player it gets proportionally bigger (like it should - I'm getting closer). Instead,Roblox has this set opp JasonTheOwner 391 — 9y
0
I will try, but it will take a lot of time, as I dont know quite how to check a player's distance from something sigve10 94 — 9y
Ad

Answer this question