Updating Progress bar Gui

I want to make a Gui that shows the progress of yourself and anyone else on the server in a race/obby type game. I have already made a script that tracks the local player’s progress using magnitude and runservice but I don’t understand how you would get everyone’s progress and place it on the local player’s Gui. Any help would be vastly appreciated.

1 Like

Send each local players progress to the server through a remote, then :FireAllClients() from the server to update the UI of everyone’s progress.

2 Likes

Wouldn’t this be ineffective as the loop runs by heartbeat, meaning it will fire the server close to every frame, for every player on the game?

*If* the progress bar doesn’t need to be exact then you could create a debounce with a wait limit at minimum, 1 second, this will make a slight delay however.

runService.Heartbeat:Connect(function()
    if debounce then -- check if the debounce is enabled
        debounce = false -- disable the debounce
           remote:FireServer(args) -- send to server
          wait(1.2) -- wait 1 second (although "wait(n)" isn't reliable)
        debounce = true -- enable the debounce
    end
end)

-- just an example
2 Likes

What exactly is the progress that you track? Is it related to the position of the character? Is it some other score? Maybe it is possible to calculate it completely locally.

1 Like