I have a leaderstat script so whenever the player equips and using a gear it adds a point to the leaderboard, but I want it to show the leaderstats for the point on gui but my script won’t work:
while wait() do
local player = game.Players.LocalPlayer
script.Parent.Text = "Height: "..player:WaitForChild("leaderstats"):FindFirstChild("Height")
end
while true do
wait(0.1)
local player = game.Players.LocalPlayer
local leaderstats = player.leaderstats.Height
script.Parent.Text = "Hight: " .. leaderstats.Value
end
This script will crash you, never do a while do statement without a wait. Also, while do loops without breaking them are costly on performance. I would advise using the one I made.