#Add Leaderstats to the gui to Replicate
1 messages · Page 1 of 1 (latest)
Wheres ur code did u even try
local player = game.Players.LocalPlayer
local guiFrame = script.Parent
local winsLabel = guiFrame:WaitForChild("WinBox")
local timeLabel = guiFrame:WaitForChild("Timebox")
local intermissionTime = 120
local roundTime = 120
local function updateWins()
local wins = player:FindFirstChild("Wins")
if wins then
winsLabel.Text = "Wins: " .. wins.Value
end
end
while true do
for i = intermissionTime, 0, -1 do
timeLabel.Text = "Next Round Starting in " .. i
updateWins()
wait(1)
end
timeLabel.Text = "Round Started"
local timeSurvived = 0
while timeSurvived < roundTime do
wait(1)
timeSurvived += 1
timeLabel.Text = "Time Survived: " .. timeSurvived
local stat = player:FindFirstChild("Time Survived")
if stat then
stat.Value = timeSurvived
end
end
end
I dont see the issue? U can already did it
Also try adding
wins.Changed:Connect(updateWins)
So it would change the wins on gui when u get one
yes do leaderstats.Wins.Changed
oh but like idk where to put the script
bruh