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: Gui Help

Previous Thread :: Next Thread 
Jack3rd is not online. Jack3rd
Joined: 08 Jan 2013
Total Posts: 5
09 Jan 2013 08:37 PM
Today, I wanted to make a gui that would pop up when I stand on a brick. I can not figure it out to save my life. Any suggestions?
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
09 Jan 2013 08:51 PM
Put this in a script, with the gui in the script.

script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") then
local a = GetPlayerFromCharacter(hit.Parent)
script.GUINAME:Clone().Parent = a.PlayerGui
wait()
end
end)



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
09 Jan 2013 09:06 PM
Massive's will error if a stray brick hits it, and not only that, GetPlayerFromCharacter is not a built in function. It is however, a method of Players.
Try this,

script.Parent.Touched:connect(function(player)
player = game.Players:GetPlayerFromCharacter(player.Parent)
if(player)then
script["Gui Name"]:clone().Parent = player.PlayerGui
end end)
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
09 Jan 2013 09:06 PM
@Top

Learn to read

if hit.Parent:findFirstChild("Humanoid") then



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
09 Jan 2013 09:08 PM
I did read it, what about an NPC? Or maybe a part with a a Humanoid in it's parent?
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
09 Jan 2013 09:10 PM
It still will error, you must have game.Players then use the GetPlayerFromCharacter method. It needs that certain object.

player = game.Players:GetPlayerFromCharacter(hit.Parent)

~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
09 Jan 2013 09:10 PM
"Massive's will error if a stray brick hits it"

>Not npc



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
09 Jan 2013 09:11 PM
Could be a stray brick in an NPC.
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
09 Jan 2013 09:12 PM
..if it's in an npc it's not a stray brick..



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
09 Jan 2013 09:13 PM
It could be if the NPC has a fountain on it's head. :3
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
09 Jan 2013 09:15 PM
npc fountain..well played.



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
09 Jan 2013 09:17 PM
Do I win? x3
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
09 Jan 2013 09:19 PM
Depends
If winning satisfies you, then go ahead and win.



|Paradoxical|
I shun thy heathen, dost thou not know that flames will devour thy mind?
Report Abuse
Jack3rd is not online. Jack3rd
Joined: 08 Jan 2013
Total Posts: 5
10 Jan 2013 08:32 PM
Worked great with my teleporter script, but how do I get the gui to close?
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