Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trying To Get Leaderstats That Constantly Update When A Player Joins?

Asked by 6 years ago
Edited 6 years ago

Hi folks, hope you're all doing well. I've run into a new problem, I have attempted to try and make a lap counter GUI that always updates so that when a player crosses the finish a lap is added and the GUI changes to whatever value the lap is at. Take a look.

function onPlayerEntered(player)
     player.CharacterAdded:connect(function(character)
     while true do
     wait(0.1)
     script.Parent.LapValue.Value = player.leaderstats.Laps.Value
        end
    end)
end

I'm still a novice hence why I ask so many questions, but I suppose the best way to learn is from your mistakes. I've been at this for a while trying new things but I'm clueless. I appreciate your time, thanks guys!

Answer this question