of     1   

ZeroHour66
#139114442Thursday, July 03, 2014 5:22 PM GMT

I have a script in a textlabel, and I want to know how to make it so the text in the textlabel equals the value for one of the leaderstats in the leaderboard.
ZeroHour66
#139115823Thursday, July 03, 2014 5:36 PM GMT

Anyone? Bump.
Kacper
#139116109Thursday, July 03, 2014 5:38 PM GMT

Put this in a local script in textlabel. local v = game.Players.LocalPlayer.leaderstats.Value -- change value to whatever you want. while true do script.Parent.Text = ("Value: " ..v.Value) end
Kacper
#139116248Thursday, July 03, 2014 5:40 PM GMT

Edit: previous version causes crash, this is good. local v = game.Players.LocalPlayer.leaderstats.Value -- change value to whatever you want. while true do script.Parent.Text = ("Value: " ..v.Value) wait(0.1) end
islandmaker2012
#139116387Thursday, July 03, 2014 5:41 PM GMT

stat = game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Kos") --change this stat.Changed:connect(function() script.Parent.Text = ("KOS: " ..stat.Value) end)
islandmaker2012
#139116446Thursday, July 03, 2014 5:41 PM GMT

@kac my script triumphs yours! yeah, im epic
ZeroHour66
#139117535Thursday, July 03, 2014 5:51 PM GMT

I put this in the localscript: stat = game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Wood") --change this stat.Changed:connect(function() script.Parent.Text = ("Wood: " ..stat.Value) end) Yet nothing appears.
Kacper
#139117607Thursday, July 03, 2014 5:52 PM GMT

I use the same scripts as you posted in my game, but I was too lazy to make "Changed" method function ^_^
islandmaker2012
#139117647Thursday, July 03, 2014 5:52 PM GMT

stat = game.Players.LocalPlayer:WaitForChild("leaderstats"):WaitForChild("Wood") --change this script.Parent.Text = ("Wood: " ..stat.Value) stat.Changed:connect(function() script.Parent.Text = ("Wood: " ..stat.Value) end)
Kacper
#139117691Thursday, July 03, 2014 5:53 PM GMT

Because u need to change the value to make it load.
ZeroHour66
#139144396Thursday, July 03, 2014 9:29 PM GMT

Okay, it's working, and I disabled the leaderboard, but now this script doesn't work. script.Parent.MouseClick:connect(function(player) if player:FindFirstChild("Stones", true).Value >= 1 then player:FindFirstChild("Stones", true).Value = player:FindFirstChild("Stones", true).Value - 1 --my stuff happens end end)
Kacper
#139194742Friday, July 04, 2014 7:24 AM GMT

Because it uses the leaderboard.
ZeroHour66
#139214733Friday, July 04, 2014 3:14 PM GMT

Is there a way to change it so it relies on the textlabels?

    of     1