|
| 13 Dec 2010 09:34 AM |
This script is in a brick with a clickdetector in it, and it is supposed to make 3 GUIs appear. I tried it, and it did NOT work. Could you please help me with this script?
A = script.Parent.Parent.Parent.StarterGui.ScreenGui.Guy1 B = script.Parent.Parent.Parent.StarterGui.ScreenGui.Guy2 --These are the lines i probably got wrong C = script.Parent.Parent.Parent.StarterGui.ScreenGui.Guy3
function onClick() A.Visible = true B.Visible = true --This is right though C.Visible = true end
script.Parent.ClickDetector.MouseClick:connect(onClick)
|
|
|
| Report Abuse |
|
|
| |
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 09:51 AM |
| You canot get the player that clicked, if there was 3 players in your game and one clicked it it would find a random person so you need to change it to a OnTouched script. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 09:53 AM |
| Ahh, I see, and well, I could find the player's name, but then only that player would see the GUI's. Thanks, I'll go test it now! |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 09:54 AM |
| i found that out because i used click buy buttons and it randomly took and gave someone a gun LOL. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 10:28 AM |
A = script.Parent.Parent.StarterGui.ScreenGui.Guy1 B = script.Parent.Parent.StarterGui.ScreenGui.Guy2 C = script.Parent.Parent.StarterGui.ScreenGui.Guy3
function onTouched(hit) A.Visible = true B.Visible = true C.Visible = true end
script.Parent.Touched:connect(onTouched)
The script still won't work. |
|
|
| Report Abuse |
|
|
| |
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 10:52 AM |
| 4 Parents :) pluss the ones that you need there to add on |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 11:34 AM |
| Hate to tell you, but with 4 parents, it's still not working. |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 11:42 AM |
Whats your set up? Ect... StarterGui --ScreenGui --STUFF... |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 11:43 AM |
Help people, I'd love to get this script working, I'll give credit if you help me out here :)
Just note that the game won't come until I get BC.. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 11:44 AM |
Setup: --Workspace -Brick script
--StarterGui -ScreenGui Guy1 Guy2 Guy3 |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
| |
|
|
| 13 Dec 2010 11:45 AM |
| Sorry you posted that while i was typing hehe |
|
|
| Report Abuse |
|
|
| |
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 12:00 PM |
Randomly Guesing..Test..
function onTouched(hit) local h = hit.Parent:findFirstChild("Humanoid") if (h ~= nil) then game.Lighting:findFirstChild("GUI NAME"):Clone().Parent = h end end
script.Parent.Touched:connect(onTouched) |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 12:02 PM |
| There are 3 GUIs I need to appear, so would you have to make a table or something? |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 12:05 PM |
| Oh Change it to ..Im guessing im not very good but...h.PlayerGui.StarterGui.ScreenGui.Stuff or something along those lines |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 12:08 PM |
| I tried your script with a single GUI and it did not work, all I want to do is make the property visible = true onTouched. |
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 12:15 PM |
Uh this bit should work because it does in my magnitude gui's
h.PlayerGui.BuyStuff.PackaPunch.Visible = true -- REplace PackaPunch with your gui name |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 12:17 PM |
Hey, maybe I've figured it out! I'll try this instead of all the parents: A = game.Workspace.StarterGui.ScreenGui.Guy1 And if that doesn't work, I'll try this A = game.StarterGui.ScreenGui.Guy1 And if that doesn't work, well, I stink. I'll go test this.
|
|
|
| Report Abuse |
|
|
BEART12
|
  |
| Joined: 22 Oct 2008 |
| Total Posts: 3190 |
|
|
| 13 Dec 2010 12:20 PM |
| No you got to find the player -_- |
|
|
| Report Abuse |
|
|
| |
|
|
| 13 Dec 2010 12:22 PM |
Find the player? I'll try, I'm not so good at finding humanoids. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2010 12:26 PM |
..Err.. well.. I think I am going to give up for today, I might restart this thread later. Plus, I gotta go evolve my ring on MS! |
|
|
| Report Abuse |
|
|