|
| 16 Aug 2011 12:31 PM |
I've been playing around with this GUI for a little while, but every time I test it out, it doesn't do what I would like it to do. For those of you that don't know what I want it to do, all I want is for the two GUI's (Menu and Start Game) to dissapear when the player clicks on 'Start Game'.-------|| || \/
Frame = game.StarterGui.ScreenGui.Menu Start = game.StarterGui.ScreenGui.Menu.Start Game
function onClick()
Frame.Transparency = 1 wait() Start.Transparency = 1 wait()
print("Game Started")
end
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:33 PM |
you need to add a connection line :
Start.MouseButton1Click:connect(OnClick) |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 16 Aug 2011 12:34 PM |
| Frame.BackgroundTransparency=1 |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 16 Aug 2011 12:34 PM |
Start = game.StarterGui.ScreenGui.Menu["Start Game"]
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:35 PM |
| Both of those things? Mmk. Thank you, I knew I forgot the Connection line, I just didn't realize it. What about making the GUI slide off the screen? I don't think I can CFrame a GUI....Can I? |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:36 PM |
| Start.Position = UDim2.new(0,0,0,0) |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
|
| 16 Aug 2011 12:37 PM |
Also; Start = game.StarterGui.ScreenGui.Menu["Start Game"]
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:38 PM |
| Brackets!? Sparta is coming..... |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 16 Aug 2011 12:39 PM |
| @Fl0x, I answered that already. :D |
|
|
| Report Abuse |
|
|
Fl0x
|
  |
| Joined: 06 Aug 2010 |
| Total Posts: 5169 |
|
| |
|
|
| 16 Aug 2011 12:41 PM |
It says 'Start.Position' what about where it ends? Or do I use something like:
for a=.1,1 do
Start.Position = Udim2.new (0,0,i,0)
something like that? |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:43 PM |
Not i, I meant a. My bad
for a=.1,1 do
Start.Position = Udim2.new (0,0,a,0)
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:44 PM |
Start.Position : the start on it is the name of your Start variable, that mean its the position of your Gui..
you can make something like that :
for i=0, 100 do Start.Position = Start.Position - UDim2.new(0,1,0,0) |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:45 PM |
i forgot the end
for i=0, 100 do Start.Position = Start.Position - UDim2.new(0,1,0,0) wait(0.1) end |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:47 PM |
Where is says 'i=0,100', where does the i go? shouldn't it be right where the 1 is in the coordinate line?
-.- I so confused. |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 16 Aug 2011 12:48 PM |
| It doesn't have to be in the code. It just repeats itself 100 times. |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
| |
|
|
| 16 Aug 2011 12:49 PM |
And where does it specify what is going to move? When your doing that with stuff in the Workspace, you have to go
ex. Part.CFrame = CFrame.new(0,0,0,)
But I'd rather not test my luck in changing 'Start.Position' |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:54 PM |
| Start is the variable you defined in the begin of your script, its the start button of your gui |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 16 Aug 2011 12:55 PM |
| 'Start.Position = Start.Position - UDim2.new(0,1,0,0)' |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:55 PM |
for example, to make both of them do this :
Frame = game.StarterGui.ScreenGui.Menu Start = game.StarterGui.ScreenGui.Menu.Start Game
for i=0, 100 do Frame.Position = Frame.Position - UDim2.new(0,1,0,0) Start.Position = Start.Position - UDim2.new(0,1,0,0) wait(0.1) end |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:57 PM |
-o-..........
..... .......... ............... .................... .........................
I feel stupid nao.... -o-
Thanks for all your guys help, hopefully it'll work |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:58 PM |
| You don't have to feel stupid because you didn't catch a code, it happen to everyone at least once.. |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 12:59 PM |
lol......i dunno. So here is the final thing: I know somewhere in there it's going: wtf. But, whatevs, as long as it works.
Frame = game.StarterGui.ScreenGui.Menu Start = game.StarterGui.ScreenGui.Menu.Start Game
function onClick()
for i=0, 100 do Frame.Position = Frame.Position - UDim2.new(0,1,0,0) Start.Position = Start.Position - UDim2.new(0,1,0,0) wait(0.1) end
Button.MouseButton1Click:connect(onClick)
|
|
|
| Report Abuse |
|
|
|
| 16 Aug 2011 01:01 PM |
Frame = game.StarterGui.ScreenGui.Menu Start = game.StarterGui.ScreenGui.Menu["Start Game"] -- You forgot the brackets
function onClick()
for i=0, 100 do Frame.Position = Frame.Position - UDim2.new(0,1,0,0) Start.Position = Start.Position - UDim2.new(0,1,0,0) wait(0.1) end
Button.MouseButton1Click:connect(onClick)
You forgot the brackets, should work with it |
|
|
| Report Abuse |
|
|