So I have a Problem with something that’s pretty much the ToH Sidebar.
local plrgui = game.ReplicatedStorage.plr
local gui = script.Parent.Parent
while true do
wait()
for _, v in pairs(game.Players:GetPlayers()) do
if not gui:FindFirstChild(v.Name) then
local clonedGui = plrgui:Clone()
clonedGui.Name = v.Name
clonedGui.Parent = gui
end
local image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=352&y=352&format=png&userid=%d"
local vgui = gui:FindFirstChild(v.Name)
local pos = math.floor(v.Character.HumanoidRootPart.Position.Y)
vgui.PlayerLabel.Image = image:format(v.UserId)
vgui.Frame.Position = UDim2.new(vgui.Frame.Position.X.Scale, 0, vgui.Frame.Position.Y.Scale, (pos*-2))
vgui.PlayerLabel.Position = UDim2.new(vgui.PlayerLabel.Position.X.Scale, 0, vgui.Frame.Position.Y.Scale,(pos*-2))
end
end
So Basically It adds a PlayerImage to a bar but the problem is when someone joins all the labels glitch and it doesnt work anymore.
I know the devforum isnt a script generator but I really need help.