So for this script i used Offset im thinking why thats the reason the billboard gui changes position and the size increases by a lot. Is there a way to fix this with scale? Heres the code:
function onPlayerRespawned(newPlayer)
wait(1)
local gui=Instance.new("BillboardGui")
gui.Parent = newPlayer.Character.Head
gui.Adornee = newPlayer.Character.Head
gui.Size = UDim2.new(3,0,5,0)
gui.StudsOffset=Vector3.new(0,2,0)
local text = Instance.new("ImageLabel")
text.Image = "rbxgameasset://Images/Rank_comm_128"
text.Size = UDim2.new(0,69,0,69)
text.Position = UDim2.new(-0.125,45,-0.25,0)
text.BackgroundTransparency = 1
text.Parent = gui
end
function onPlayerEntered(newPlayer)
newPlayer.Changed:connect(function (property)
if (property == "Character") then
onPlayerRespawned(newPlayer)
end
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)
|