You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want my Leaderstats value to be on my Textlabel
What is the issue? Include screenshots / videos if possible!
It doesn’t seem to work
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I tried searching up but nothing works
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local leaderstats = game.Players.LocalPlayer.Character:WaitForChild("leaderstats").Miles
leaderstats.Changed:Connect(function()
script.Parent.Text = leaderstats.Value
end)
Do you see any errors in the output? According to what I see, you may be trying to get the leaderstats from the character (which is not where they are stored usually).
Could this solve the issue?
local miles = game.Players.LocalPlayer.Character:WaitForChild("leaderstats").Miles
local label = script.Parent
label.Text = miles.Value
miles.Changed:Connect(function(value)
label.Text = miles.Value
end)