|
| 26 Jun 2014 07:28 PM |
I'm trying to make it so when a new player joins they get the Choose-Your-Class-GUI. But when they level up to 2+ and come back to the game they won't have to go through the choose-class-gui again but it keep showing it, any suggestions?
function onEnter(player) repeat wait() until player.Character ~= nil g = game.ReplicatedStorage:FindFirstChild("ChooseClassGUI") if player:FindFirstChild("leaderstats").Lvl.Value > 2 then player.Character.Torso.CFrame = game.Workspace.StartingArea2.CFrame player.PlayerGui:FindFirstChild("ChooseClassGUI"):Destroy() elseif player:FindFirstChild("leaderstats").Lvl.Value < 2 then player.Character.Torso.CFrame = game.Workspace.StartingArea.CFrame g:clone().Parent = player.PlayerGui end end game.Players.PlayerAdded:connect(onEnter)
|
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 26 Jun 2014 07:30 PM |
>=
if they are level two, there's nothing that's called.
2 is not greater than 2
2 is not less than 2
2 is equal to 2 |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 07:36 PM |
| Okay I did that and it worked in Test Solo mode from Edit Mode. But now in Play Mode it does not work, would it make a difference with a LocalScript? |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 26 Jun 2014 07:39 PM |
| sometimes, when you publish in studio, it doesn't actually publish. check if it's updated by checking 'updated:' on your game |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 07:42 PM |
| I did and I tested it 4 times trying it and it keeps teleporting me to the Second Area that's supposed to get rid of the GUI but it keeps teleporting me to the First Area with the GUI even though I am level 4. |
|
|
| Report Abuse |
|
|
|
| 26 Jun 2014 07:50 PM |
| nvm I found my problem, it was that the leaderboard data save loaded to slow and the Enter Script would read instantly. |
|
|
| Report Abuse |
|
|