#BillboardGui Text Size
1 messages · Page 1 of 1 (latest)
use TextScaled
TextLabel.TextScaled = true
or else you can manual scale with StudsOffset if you want more contorl
local RunService = game:GetService("RunService")
local camera = workspace.CurrentCamera
local billboardGui = -- your BillboardGui
local targetPart = -- the part the billboard is attached to
RunService.Heartbeat:Connect(function()
if camera and targetPart then
local distance = (camera.CFrame.Position - targetPart.Position).Magnitude
local scale = math.max(0.1, 1 / (distance * 0.1)) -- adjust multiplier as needed
billboardGui.Size = UDim2.new(10 * scale, 0, 2 * scale, 0)
end
end)
yeah as i said it seems to only work when having it enabled but wont this cause to have different sized text depending on length? when i have player names being 3-20 characters
ORRRRRRRR
you can use
billboardGui.StudsOffsetWorldSpace = Vector3.new(0, 0, 0)
all those options wil lwork
hmmmm
fixed TextSize with distance scaling
TextLabel.TextScaled = false
TextLabel.TextSize = 14
TextLabel.TextWrapped = false
i guess this will solve your issue
nope
hmmmm
try
TextLabel.TextScaled = false
TextLabel.TextSize = 14
TextLabel.AutomaticSize = Enum.AutomaticSize.XY
TextLabel.Size = UDim2.new(0, 0, 1, 0)
any news
also not
hmmmm
than we need the manual way
here
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
local camera = workspace.CurrentCamera
local function updateTextSize()
for _, player in pairs(Players:GetPlayers()) do
if player.Character and player.Character:FindFirstChild("Head") then
local billboardGui = player.Character.Head:FindFirstChild("BillboardGui")
if billboardGui then
local textLabel = billboardGui:FindFirstChild("TextLabel")
if textLabel then
local distance = (camera.CFrame.Position - player.Character.Head.Position).Magnitude
local baseSize = 14
local scaleFactor = math.max(0.5, math.min(2, 100 / distance))
textLabel.TextSize = baseSize * scaleFactor
end
end
end
end
end
RunService.Heartbeat:Connect(updateTextSize)
use this
if nothing worked than youre cooked
try it
ill just wait for somebody who knows how to, ty for the attempts
if it didnt work you can always undo