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: Obviously it hates me

Previous Thread :: Next Thread 
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
16 Aug 2011 12:33 PM
you need to add a connection line :

Start.MouseButton1Click:connect(OnClick)
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
16 Aug 2011 12:34 PM
Frame.BackgroundTransparency=1
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
16 Aug 2011 12:34 PM
Start = game.StarterGui.ScreenGui.Menu["Start Game"]

Report Abuse
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
16 Aug 2011 12:36 PM
Start.Position = UDim2.new(0,0,0,0)
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
16 Aug 2011 12:37 PM
Also;
Start = game.StarterGui.ScreenGui.Menu["Start Game"]
Report Abuse
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
16 Aug 2011 12:38 PM
Brackets!? Sparta is coming.....
Report Abuse
Flurite is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
16 Aug 2011 12:39 PM
@Fl0x, I answered that already. :D
Report Abuse
Fl0x is not online. Fl0x
Joined: 06 Aug 2010
Total Posts: 5169
16 Aug 2011 12:39 PM
Space!?
Error is coming.
Report Abuse
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
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
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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 is not online. 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 is not online. Flurite
Joined: 03 Apr 2011
Total Posts: 5386
16 Aug 2011 12:49 PM
in the loop*
Report Abuse
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
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 is not online. 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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
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
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
16 Aug 2011 12:57 PM
-o-..........

.....
..........
...............
....................
.........................

I feel stupid nao.... -o-

Thanks for all your guys help, hopefully it'll work
Report Abuse
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
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
roblox42658 is not online. roblox42658
Joined: 19 Dec 2007
Total Posts: 895
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
moustachauve is not online. moustachauve
Joined: 29 Jul 2009
Total Posts: 668
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
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