BlueHound
|
  |
| Joined: 30 Jan 2012 |
| Total Posts: 1971 |
|
|
| 02 Jul 2012 07:31 PM |
Can leaderboards be connected to GUIs?
Like if I have a GUI shop, could I make it work with a leader board, which contains the money? |
|
|
| Report Abuse |
|
|
|
| 02 Jul 2012 07:32 PM |
That's kind of how GUI-based shops work.
> † KMXD † |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 02 Jul 2012 07:36 PM |
| Yea. The leaderstats are with the Player. Gui's are within the PlayerGui that are within the player. You just have to make it to check the Value of a certain Stat. |
|
|
| Report Abuse |
|
|
dddylan98
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 1497 |
|
|
| 02 Jul 2012 07:40 PM |
function onClicked() game.Players.LocalPlayer.leaderstats.Money.Value = game.Players.LocalPlayer.leaderstats.Money.Value - 500 end
script.Parent.MouseButton1Down:connect(onClicked)
This would be put in a TextButton and would remove 500 Money. Basic script. |
|
|
| Report Abuse |
|
|
WhiteRain
|
  |
| Joined: 24 Apr 2010 |
| Total Posts: 2723 |
|
|
| 02 Jul 2012 07:45 PM |
@dddylan You forgot to mention that it had to be a LocalScript :P |
|
|
| Report Abuse |
|
|
dddylan98
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 1497 |
|
|
| 02 Jul 2012 07:46 PM |
| I figured the LocalPlayer would be obvious to a scripter but. Meh yeah c: |
|
|
| Report Abuse |
|
|