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 » Scripters
Home Search
 

Re: Gui Appears Only Once and only when at Level 5

Previous Thread :: Next Thread 
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
22 Aug 2016 08:51 PM
Yes, I do have a level system.

So, I need help that a Team Picker GUI will only appear once and only at Level 5. For example, once a player dies after picking a team it won't appear again even though their level is at 5.

Can someone please help? I need help ASAP
Report Abuse
seliso is not online. seliso
Joined: 30 Jan 2011
Total Posts: 6443
22 Aug 2016 08:57 PM
if playerLevel <= 5 then
--show gui
end
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
22 Aug 2016 09:12 PM
wtf is that gonna do
Report Abuse
ServerDaddy is not online. ServerDaddy
Joined: 23 Aug 2015
Total Posts: 15857
22 Aug 2016 09:20 PM
Increase it some more .
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
23 Aug 2016 07:21 PM
@Seliso that won't work. It needs to appear only once and when the player just turns level 5.
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
23 Aug 2016 07:23 PM
@eznotinman

What the heck do you even mean. Do you even understand what I just asked for? I asked how am I gonna make a gui that will only appear once and only when a player just turns to level 5.
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
23 Aug 2016 07:24 PM
@ServerDaddy
INCREASE WHAT MORE??
Report Abuse
Alimegacorn is not online. Alimegacorn
Joined: 24 May 2013
Total Posts: 899
23 Aug 2016 07:27 PM
first put your gui thingy in somewhere like replicatedstorage
then just check for the value of the players level like this:
if game.Players.LocalPlayer.leaderstats.levelthingy.Value == 5 then (you probably need to change this to what fits you)
then just clone your gui to the player's player gui like this:
local hi = game.ReplicatedStorage.GUIthingy.Frame:Clone()
hi.Parent = game:GetService("Players").LocalPlayer.PlayerGui
then make a close button or something to make it disappear
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
23 Aug 2016 07:32 PM
i was talking to the guy above me sorry if that wasnt clear but to answer your question just do an if statement like

if player is level 5 and not in a team then
code
end

pseudo code.
Report Abuse
Alimegacorn is not online. Alimegacorn
Joined: 24 May 2013
Total Posts: 899
23 Aug 2016 07:32 PM
and make sure you include the .Changed function like this:

game.Players.LocalPlayer.leaderstats.level.Value.Changed:connect(function()

end)
Report Abuse
GearMechs is not online. GearMechs
Joined: 01 Dec 2010
Total Posts: 1220
23 Aug 2016 07:57 PM
a simple line of code for you:

d = 1

if playerLevel <= 5 and d == 1 then

d = 0

--your code here for the gui


end
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
23 Aug 2016 07:59 PM
^^^^^^^
but that wouldn't work if they re-joined the game right?
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
24 Aug 2016 08:18 AM
none of them work. all of the above don't work.
Report Abuse
enzotinman1 is not online. enzotinman1
Joined: 22 Jun 2012
Total Posts: 408
24 Aug 2016 08:22 AM
how are you triggering the gui appearing in the first place? also are you using exp?
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
25 Aug 2016 08:20 AM
@Enzo ya i use exp too. But i only make it trigger once the person is at level 5.. wait... I think I need to use exp as well.
Report Abuse
Objectly is not online. Objectly
Joined: 18 Jul 2016
Total Posts: 210
25 Aug 2016 08:47 AM
Assuming your getting your numerical level from a userdata/object value, you can do object.Changed:connect. This will only fire once the object has changed via a decrease or increase in its value.

Since your level system should only be going up, once the level has hit five, you should check with if/then statements. Then the gui will pop up. This will only happen once as the player will only level up to level five once.
Report Abuse
Sys_ClickerCode is not online. Sys_ClickerCode
Joined: 11 Aug 2016
Total Posts: 6
25 Aug 2016 10:23 AM
use datastore to make sure it'll only appear once..
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
28 Aug 2016 04:30 AM
This is my script. Cloning the frame doesn't work so I made a button to function the Team Gui. Doesn't work still...

game.Players.LocalPlayer.leaderstats.EXP.Changed.Value:Connect(function()
if game.Players.LocalPlayer.leaderstats.Level.Value <=5 then
script.Parent.Parent.TextButton.Visible = true
end
end)


Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
28 Aug 2016 04:33 AM
"script.Parent.Parent.TextButton.Visible = true"

try pathing this to the player's playergui

game.Players.LocalPlayer.PlayerGui.PathHere.Visible = true
Report Abuse
Cole3bob4 is not online. Cole3bob4
Joined: 08 Jan 2011
Total Posts: 4475
28 Aug 2016 04:36 AM
lol are you trying to make a pokemon game


Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
28 Aug 2016 04:52 AM
@Cole
Um, I already did. Just needs minor fixes and more updates.
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
28 Aug 2016 04:57 AM
@LordNarwhal

This is what my script looks like now,
but it still doesn't work...

game.Players.LocalPlayer.leaderstats.EXP.Changed.Value:Connect(function()
if game.Players.LocalPlayer.leaderstats.Level.Value == 5 then
game.Players.LocalPlayer.PlayerGui["Pick a Team"].TextButton.Visible = true
end
end)
Report Abuse
RachelGP is not online. RachelGP
Joined: 09 Nov 2012
Total Posts: 25
28 Aug 2016 06:23 AM
Updated the script, still doesn't work and i don't know why..
Can someone please help ASAP?

game.Players.LocalPlayer.leaderstats.Level.Value.Changed:connect(function()
if game.Players.LocalPlayer.leaderstats.Level.Value == 5 then
local Team = game.Lighting["Pick a Team"]:clone()
Team.Parent = game.Players.LocalPlayer.PlayerGui
end
end)
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
28 Aug 2016 06:31 AM
my guess is that level is never changing

try using a print after the function

make sure it's happening

also

the first parameter in the changed event is the value

try this

game.Players.LocalPlayer.leaderstats.Level.Value.Changed:connect(function(value)
if value == 5 then
local Team = game.Lighting["Pick a Team"]:clone()
Team.Parent = game.Players.LocalPlayer.PlayerGui
end
end)
Report Abuse
Lord_Narwhal is not online. Lord_Narwhal
Joined: 05 May 2012
Total Posts: 3242
28 Aug 2016 06:31 AM
whoops, minor error

game.Players.LocalPlayer.leaderstats.Level.Changed:connect(function(value)
if value == 5 then
local Team = game.Lighting["Pick a Team"]:clone()
Team.Parent = game.Players.LocalPlayer.PlayerGui
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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