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: Remove GUI

Previous Thread :: Next Thread 
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 02:52 AM
So, the GUI fades as it should and all, but it pops up again each time someone is re-spawned. What do I need to do to fix this? I only want it to pop up ONCE, when the player first enters the game.

for i=0.01, 1, 0.01 do
script.Parent.TextTransparency=0+i
script.Parent.TextStrokeTransparency=0+i
script.Parent.Parent.BackgroundTransparency=0+i
wait()

end
end

Intro()

wait(4)
gui:Remove()
Report Abuse
SLY3 is not online. SLY3
Joined: 10 Jul 2008
Total Posts: 1700
04 Apr 2014 02:54 AM
Maybe do this:

Add a Model in Workspace called "PlayersEntered", and then make a value in that Model for each player that joins. Then check if you can find "PlayerName" in the Model, and if you can, it removes GUI.
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 02:57 AM
NumberValue? Or a different value?

And how would I make it so that it creates a value for each player entering the game?
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
04 Apr 2014 04:50 AM
Ok, so put the Gui inside of the server storage.

put a script in the workspace with this

game.Players.PlayerAdded:connect(function(plr)
g = game.ServerStorage.ScreenGui:clone()
g.Parent = plr.PlayerGui
end)

-King Scrub
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
04 Apr 2014 05:58 AM
for i=0.01, 1, 0.01 do
script.Parent.TextTransparency=0+i
script.Parent.TextStrokeTransparency=0+i
script.Parent.Parent.BackgroundTransparency=0+i
wait()

end
end

Intro()

wait(4)
gui:Destroy()

Disable it

Clone that with this script;

Script = THE-SCRIPT-ABOVE-PATH

game.Players.PlayerAdded:connect(function(p)
S = Script:Clone()
S.Parent = p.Backpack
S.Disabled = false
end)
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 04:03 PM
Marolex, I tried what you suggested and it didn't bring the GUI up at all.

warspyking, I'm confused as to why this would be replicated into the Backpack. Isn't that where tools and such go?
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
04 Apr 2014 04:07 PM
is "gui" defined in the last couple lines?
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 04:10 PM
What do you mean?

I'm an amateur when it comes to scripting so bare with me. I'm learning!
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
04 Apr 2014 04:13 PM
Oh, sorry. I thought you were cloning a local script.
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 04:19 PM
Yeah, it is a local script.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
04 Apr 2014 04:36 PM
gui:Remove()

what is gui here?

is the scripts parent? If so, put this at the top of the script

gui = script.Parent
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 04:40 PM
Here is the entire script, edited to only show the main components of the script:

gui = script.Parent.Parent.Parent
textLabel = gui.Frame.TextLabel

function Intro()
textLabel.Text = " "
wait(4)

[[OTHER TEXTLABELS HERE, BUT HAVE BEEN REMOVED TO SHORTEN SCRIPT]]

for i=0.01, 1, 0.01 do
script.Parent.TextTransparency=0+i
script.Parent.TextStrokeTransparency=0+i
script.Parent.Parent.BackgroundTransparency=0+i
wait()

end
end

Intro()

wait(4)
gui:Remove()
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
04 Apr 2014 04:49 PM
does it work?
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 05:35 PM
Yes, it works, but it doesn't prevent the GUI from popping up every time the player dies. That's what I'm trying to fix.
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
04 Apr 2014 05:39 PM
have the GUI in replicated storage, and have this script in workspace


game.Players.PlayerAdded:connect(function(newP)
gui = game.ReplicatedStorage.Gui:clone()
gui.Parent = newP.PlayerGui
end)
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 06:02 PM
Not working.
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
04 Apr 2014 06:04 PM
it need's editing xD
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 06:10 PM
How so?
Report Abuse
McChicken72 is not online. McChicken72
Joined: 09 Feb 2013
Total Posts: 1115
04 Apr 2014 06:12 PM
ur dumb xD
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
04 Apr 2014 06:13 PM
And you're no help.
Report Abuse
Marolex is not online. Marolex
Joined: 17 Dec 2012
Total Posts: 1785
05 Apr 2014 01:00 AM
It's not moving it to the backpack... just use my script.

and btw for it to work, this will only work in play mode and not test mode.

-King Scrub
Report Abuse
Chubs1995 is not online. Chubs1995
Joined: 02 Sep 2007
Total Posts: 339
07 Apr 2014 02:16 AM
I already told you that it didn't work. And yes, I'm in play mode.
Report Abuse
Duelingwarlord is not online. Duelingwarlord
Joined: 15 Feb 2010
Total Posts: 22333
07 Apr 2014 02:45 AM
use :WaitForChild("PlayerGui") in his.
Report Abuse
davisky2 is not online. davisky2
Joined: 04 Mar 2012
Total Posts: 4710
07 Apr 2014 07:12 AM
Simply do dis:

game.Players.PlayerAdded:connect(function(player)
-- REMEMBER to put Gui in workspace!
game.Workspace.Gui:Clone().Parent = player.PlayerGui

function Intro()
textLabel.Text = " "
wait(4)

[[OTHER TEXTLABELS HERE, BUT HAVE BEEN REMOVED TO SHORTEN SCRIPT]]

for i=0.01, 1, 0.01 do
script.Parent.TextTransparency=0+i
script.Parent.TextStrokeTransparency=0+i
script.Parent.Parent.BackgroundTransparency=0+i
wait()

end
end

Intro()

wait(4)
gui:Remove()
end)

This should work...
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
07 Apr 2014 08:59 AM
[ Content Deleted ]
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