More efficient way to do while wait(0.1) do?

Currently have a local script which gets the players value of a leaderstat and displays it on a textlabel, right now my script looks like:

while wait(0.1) do

script.Parent.Text = game.Players.LocalPlayer.extrastats.ServerKills.Value…"/ 10"

end

Though im wondering if theirs a better way to do this as im unsure if doing a while wait loop is best for performance after looking online

game.Players.LocalPlayer.extrastats.ServerKills.Changed:Connect(function(val)
    script.Parent.Text = val .. '/10'
end)
3 Likes

https://developer.roblox.com/en-us/api-reference/event/IntValue/Changed

If you want to learn about the solution.

Maybe get rid of the 0.1 in the wait function to make it slightly faster?