This is a simple script I made that makes a image show where you are relative to the finish, how would I make it so it showed all the players in the server?
Current script that only shows one player:
local Player = game.Players.LocalPlayer
local rs = game:GetService("RunService")
local Players = game:GetService("Players")
local de = true
while de == true do
wait(1)
if Player.Character:FindFirstChild("HumanoidRootPart") then
de = false
end
end
local HRP = Player.Character:WaitForChild("HumanoidRootPart")
local userId = Player.UserId
local thumbType = Enum.ThumbnailType.HeadShot
local thumbSize = Enum.ThumbnailSize.Size420x420
local content, isReady = Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
local Frame = Player.PlayerGui.ProgressBarUI.ProgessBar
game.Workspace:WaitForChild("AllDoors") game.Workspace.AllDoors:WaitForChild("Final")
local End = game.Workspace.AllDoors.Final.Ground
local image
if Frame:FindFirstChild(Player.Name.."img") == nil then
image = script.ImageLabel:Clone()
image.Parent = Frame
image.Image = content
image.Name = Player.Name.."img"
else
image = Frame:FindFirstChild(Player.Name.."img")
end
rs.Heartbeat:Connect(function()
if Player.Character:FindFirstChild("HumanoidRootPart") then
local HRP = Player.Character:WaitForChild("HumanoidRootPart")
local x = (HRP.Position - End.Position).Magnitude
local h = (End.Position - game.Workspace.SpawnLocation.Position).Magnitude
local r = Frame.Size
image.Position = UDim2.new(1-x/h,0,Frame.Size.Y.Scale /2,0)
end
end)
Thank you so much - BMWLux