generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I needs help :(

Previous Thread :: Next Thread 
WarlordPrincess is not online. WarlordPrincess
Joined: 29 May 2014
Total Posts: 16
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 is not online. 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
WarlordPrincess is not online. WarlordPrincess
Joined: 29 May 2014
Total Posts: 16
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 is not online. 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
WarlordPrincess is not online. WarlordPrincess
Joined: 29 May 2014
Total Posts: 16
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
WarlordPrincess is not online. WarlordPrincess
Joined: 29 May 2014
Total Posts: 16
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image