I’ve been making a type of race system in roblox studio, and I’ve been having trouble on how to making the end results of each round
So each player has a points int value in them, and it can be increased during the race, and i want to make it so at the end of each race round, it checks all of the players in the server’s points value, and places them depending on it, like the person with the most points is shown to be 1st, the person with the 2nd most is shown to be 2nd, and so on
I want this placement to be shown with a gui, and each player in the server it makes a new template of it and gives them their placement in the game depending on their points intvalue
(i made 3 just for the uigridlayout to show)
I want a new template to be made for each player in the server, showing their points value at the end of the race and places them depending on it
this is the intermission/race round systme script in serverscriptservice
local LobbyMinutes = 0
local LobbySeconds = 10
local GameMinutes = 0
local GameSeconds = 15
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local coinEvent = game:GetService("ServerStorage"):FindFirstChild("CoinEvent")
local deletecoinsevent = game:GetService("ServerStorage"):FindFirstChild("DeleteCoinsEvent")
local TimerValues = ReplicatedStorage:WaitForChild("TimerValues")
local gameTimer = TimerValues.GameTimer
local lobbyTimer = TimerValues.LobbyTimer
local TweenService = game:GetService("TweenService")
local FadeInfo = TweenInfo.new(1.3,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false,0)
function teleportPlayers(RP,SpawnPart)
if RP ~= nil then
if SpawnPart ~= nil then
RP.CFrame = SpawnPart.CFrame
end
end
end
while true do
lobbyTimer.Minutes.Value = LobbyMinutes
lobbyTimer.Seconds.Value = LobbySeconds
repeat wait(1)
if lobbyTimer.Seconds.Value > 0 then
lobbyTimer.Seconds.Value -= 1
else
if lobbyTimer.Minutes.Value > 0 then
lobbyTimer.Minutes.Value -= 1
lobbyTimer.Seconds.Value = 59
end
end
until lobbyTimer.Minutes.Value == 0 and lobbyTimer.Seconds.Value == 0
local MapstoCoins = {
["SnowMap1"] = "CoinSpawnSnow",
["DesertMap1"] = "CoinSpawnDesert"
}
local mapHolder = game:GetService("ServerStorage").MapHolder
local coinsHolder = game:GetService("ServerStorage").CoinsHolder
local Children = mapHolder:GetChildren()
local CoinChildren = coinsHolder:GetChildren()
local Index = math.random(1,#Children)
local randomInt = Children[Index]
local finalMap = mapHolder:FindFirstChild(randomInt.Name):Clone()
for _,coinmaps in pairs(CoinChildren) do
if coinmaps.Name == MapstoCoins[randomInt.Name] then
local finalcoinMap = coinmaps:Clone()
finalcoinMap.Parent = workspace.ChosenCoinMap
coinEvent:Fire(coinmaps)
print("coineventfired")
finalMap.Parent = workspace
for _, LocalPlayer in pairs(game:GetService("Players"):GetChildren()) do
if LocalPlayer.Character then
if LocalPlayer:FindFirstChild('PlayerGui') and LocalPlayer.Character:FindFirstChild('HumanoidRootPart') then
local GUI = Instance.new("ScreenGui")
GUI.Name = "Fade"
GUI.Parent = LocalPlayer.PlayerGui
GUI.ResetOnSpawn = false
GUI.IgnoreGuiInset = true
GUI.Enabled = true
local NewValue = Instance.new("BoolValue")
NewValue.Name = "Ingame"
NewValue.Parent = LocalPlayer.Character
NewValue.Value = false
local Frame = Instance.new("Frame")
Frame.Parent = GUI
Frame.BackgroundTransparency = 1
Frame.BackgroundColor3 = Color3.fromRGB(0,0,0)
Frame.Visible = true
Frame.Size = UDim2.new(1,0,1,0)
Frame.Position = UDim2.new(0,0,0,0)
local TweenIn = TweenService:Create(Frame,FadeInfo,{BackgroundTransparency = 0})
TweenIn:Play()
TweenIn.Completed:Connect(function()
teleportPlayers(LocalPlayer.Character.HumanoidRootPart,finalMap:FindFirstChild('SpawnPart'))
wait(2)
local TweenOut = TweenService:Create(Frame,FadeInfo,{BackgroundTransparency = 1})
TweenOut:Play()
TweenOut.Completed:Connect(function()
GUI:Destroy()
end)
end)
end
end
end
wait(1.6 + 2)
gameTimer.Minutes.Value = GameMinutes
gameTimer.Seconds.Value = GameSeconds
repeat wait(1)
if gameTimer.Seconds.Value > 0 then
gameTimer.Seconds.Value -= 1
else
if gameTimer.Minutes.Value > 0 then
gameTimer.Minutes.Value -= 1
gameTimer.Seconds.Value = 59
end
end
until gameTimer.Minutes.Value == 0 and gameTimer.Seconds.Value == 0
for _, LocalPlayer in pairs(game:GetService("Players"):GetChildren()) do
if LocalPlayer.Character then
if LocalPlayer:FindFirstChild('PlayerGui') and LocalPlayer.Character:FindFirstChild('Ingame') then
local GUI = Instance.new("ScreenGui")
GUI.Name = "Fade"
GUI.Parent = LocalPlayer.PlayerGui
GUI.ResetOnSpawn = false
GUI.IgnoreGuiInset = true
GUI.Enabled = true
local Frame = Instance.new("Frame")
Frame.Parent = GUI
Frame.BackgroundTransparency = 1
Frame.BackgroundColor3 = Color3.fromRGB(0,0,0)
Frame.Visible = true
Frame.Size = UDim2.new(1,0,1,0)
Frame.Position = UDim2.new(0,0,0,0)
local TweenIn = TweenService:Create(Frame,FadeInfo,{BackgroundTransparency = 0})
TweenIn:Play()
TweenIn.Completed:Connect(function()
LocalPlayer:LoadCharacter()
wait(2)
local TweenOut = TweenService:Create(Frame,FadeInfo,{BackgroundTransparency = 1})
TweenOut:Play()
TweenOut.Completed:Connect(function()
GUI:Destroy()
end)
end)
end
end
end
wait(1.6)
deletecoinsevent:Fire()
finalMap:Destroy()
finalcoinMap:Destroy()
wait(2)
end
end
end
s
how can i make a placement system like that? since i dont evne know where to even start