Astrobit
|
  |
| Joined: 03 Aug 2015 |
| Total Posts: 68 |
|
|
| 28 Jun 2016 01:06 PM |
I am making an obby, and want a counter in the leaderboard that says Stage.
How can I make one?
Please don't reply hatefully. |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 28 Jun 2016 01:08 PM |
game.Players.PlayerAdded:connect(function(p) local stats=Instance.new('IntValue',p) stats.Name='leaderstats'
local stage=Instance.new('IntValue',stats) stage.Name='Stage' stage.Value=1 end)
|
|
|
| Report Abuse |
|
|
Astrobit
|
  |
| Joined: 03 Aug 2015 |
| Total Posts: 68 |
|
|
| 28 Jun 2016 01:13 PM |
That worked, but how do I make it so once someone reaches another level the stage number changes?
Please don't reply hatefully. |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 28 Jun 2016 01:15 PM |
You will need to offer something, I don't do much requests.
|
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 01:15 PM |
make a brick and insert a script into it with this code
script.Parent.Touched:connect(function(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then plr.leaderstats.Stage.Value = plr.leaderstats.Stage.Value + 1 end |
|
|
| Report Abuse |
|
|
Viikko
|
  |
| Joined: 23 Jan 2015 |
| Total Posts: 249 |
|
|
| 28 Jun 2016 01:16 PM |
| i can do that for free just give me some time |
|
|
| Report Abuse |
|
|
Viikko
|
  |
| Joined: 23 Jan 2015 |
| Total Posts: 249 |
|
|
| 28 Jun 2016 01:17 PM |
| don't use tornado's that's garbage |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 28 Jun 2016 01:18 PM |
Since I am feeling generous
--Inside the spawn, name it the stage number
script.Parent.Touched:connect(function(hit) local p=game.Players:GetPlayerFromCharacter(hit.Parent) if p then p:WaitForChild('leaderstats').Stage.Value=tonumber(script.Parent.Name) or 0 end end)
|
|
|
| Report Abuse |
|
|
Astrobit
|
  |
| Joined: 03 Aug 2015 |
| Total Posts: 68 |
|
|
| 28 Jun 2016 01:18 PM |
How is his garbage?
Please don't reply hatefully. |
|
|
| Report Abuse |
|
|
Tynezz
|
  |
| Joined: 28 Apr 2014 |
| Total Posts: 4945 |
|
|
| 28 Jun 2016 01:19 PM |
Because if you keep on jumping on it, your stage will go up and up.
|
|
|
| Report Abuse |
|
|
Astrobit
|
  |
| Joined: 03 Aug 2015 |
| Total Posts: 68 |
|
|
| 28 Jun 2016 01:21 PM |
Makes sense. Thanks.
Please don't reply hatefully. |
|
|
| Report Abuse |
|
|
|
| 28 Jun 2016 02:32 PM |
got a fix
script.Parent.Touched:connect(function(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then plr.leaderstats.Stage.Value = *insert level here* end
Sorry, i was rushing. IDK why i was, but i was. |
|
|
| Report Abuse |
|
|