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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
|
| 09 Jan 2013 09:11 PM |
| Could be a stray brick in an NPC. |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| Joined: 09 Jun 2009 |
| Total Posts: 6635 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|