|
| 03 May 2016 09:21 PM |
if (key~=nil) then key:lower() repeat if (key == "z") and player.Character.Humanoid.WalkSpeed<200 and script.Active.Value == true then i = 1 wait(0.001) player.Character.Humanoid.WalkSpeed = player.Character.Humanoid.WalkSpeed+25 else break end until i == 0 end end
if Player.LeaderBoard.Level == 1 then player.Character.Humanoid.WalkSpeed<400 and script.Active.Value == true then end
The full script worked fine, but when I added the second part, "if player.leaderboard.level" it messed up. Now I know that isn't the correct way to look for stats, so i'd be grateful if you could tell me that part? |
|
|
| Report Abuse |
|
|
| |
|
xlaser23
|
  |
| Joined: 10 Dec 2011 |
| Total Posts: 20341 |
|
| |
|
|
| 03 May 2016 09:32 PM |
Okay, so the first part of the script is how much speed they get when they press the key 'z' which is 200.
I'm trying to make it so that once you get to a certain level, that 200 raises to something else so you can go faster.
I tried doing it in the second part, but I messed up with locating the leaderboards or something. |
|
|
| Report Abuse |
|
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 03 May 2016 09:33 PM |
| you're addressing an object as if it were a value; you need to add the Value property after the object instead of comparing the actual object to a number |
|
|
| Report Abuse |
|
|
| |
|
Skellobit
|
  |
| Joined: 13 Apr 2016 |
| Total Posts: 12758 |
|
|
| 03 May 2016 09:41 PM |
"if Player.LeaderBoard.Level == 1" if Player.LeaderBoard.Level.Value == 1 |
|
|
| Report Abuse |
|
|
|
| 03 May 2016 09:47 PM |
Okay, lol I see.
But that part of the code wouldn't work either because firs I would need to find the player, and then the stats or something and I'm not all that well rounded with finding stuff within players. |
|
|
| Report Abuse |
|
|
|
| 04 May 2016 04:07 PM |
| How would I find specific stats in the player? |
|
|
| Report Abuse |
|
|
|
| 04 May 2016 05:19 PM |
| I beleive its leaderstats not LeaderBoard |
|
|
| Report Abuse |
|
|
| |
|
|
| 04 May 2016 06:41 PM |
@gloriousryan
Doesn't have to be leaderstats, it could be a custom value.
Profit pls. |
|
|
| Report Abuse |
|
|