|
| 17 Jul 2014 05:12 PM |
This wont work, it's a button on a gui when they click ok, it's suppose to open another gui and close it's self, help. Here's the script
game.Lighting.ScreenGui:clone().Parent = game.StarterGui Wait(1) |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:14 PM |
close itself? whats after the wait(1)? |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:15 PM |
end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:15 PM |
| You need to clone it into their PlayerGui. Until you know more, avoid editing StarterGui. |
|
|
| Report Abuse |
|
|
BlupoV2
|
  |
| Joined: 12 Nov 2012 |
| Total Posts: 543 |
|
|
| 17 Jul 2014 05:15 PM |
| So, it's in a function, correct? |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:16 PM |
Your script puts the GUI into the games StarterGUI..
Put it in the Players startergui so that way the person who clicks also get the GUI. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Scriptos
|
  |
| Joined: 17 Jun 2008 |
| Total Posts: 2900 |
|
|
| 17 Jul 2014 05:17 PM |
script.Parent.MouseButton1Down:connect(function() game.Lighting.ScreenGui:clone().Parent=script.Parent.Parent.Parent; script.Parent:Destroy(); end);
This will work assuming that;
1.) The script is inside of a button.
2.) The button is inside of a screen gui.
3.) The screen gui is inside of a player's PlayerGui.
4.) There is an object in lighting named ScreenGui. |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:17 PM |
The entire thing
print("Close button loaded")
button = script.Parent window = script.Parent.Parent.Parent
function onClicked(GUI) window:remove() game.Lighting.ScreenGui:clone().Parent = game.PlayerGui
end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
Scriptos
|
  |
| Joined: 17 Jun 2008 |
| Total Posts: 2900 |
|
|
| 17 Jul 2014 05:18 PM |
You may want to add an extra parent on to that, my mistake.
script.Parent.MouseButton1Down:connect(function() game.Lighting.ScreenGui:clone().Parent=script.Parent.Parent.Parent; script.Parent.Parent:Destroy(); end); |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:18 PM |
| @Scriptos, I did all that. |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:18 PM |
You add it to the player's PlayerGui |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:19 PM |
script.Parent.MouseButton1Click:connect(function()
Clone = game.Lighting.ScreenGui:Clone() Clone.Parent = player:WaitForChild("PlayerGui") wait(1)
end)
Something like that... |
|
|
| Report Abuse |
|
|
|
| 17 Jul 2014 05:19 PM |
| SCritpos, Your code worked. Thank you. |
|
|
| Report Abuse |
|
|