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: Whats wrong with this?

Previous Thread :: Next Thread 
areaquest2 is not online. areaquest2
Joined: 05 Jun 2010
Total Posts: 196
11 Feb 2013 04:16 PM
What is wrong with this?

function OnClick()
if Clicked == true then
game.StarterGui.ScreenGui.TextBox.Visible=false
game.StarterGui.ScreenGui.TextButton.Visible=salfe
end
end

sorry but it in't using the indents.
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
11 Feb 2013 04:19 PM
Clicked is nil.
No connection line.
Forums dont like whitespace because stupidity.
Report Abuse
areaquest2 is not online. areaquest2
Joined: 05 Jun 2010
Total Posts: 196
11 Feb 2013 04:21 PM
so it would be
game.StarterGui.ScreenGui.TextButton.connect:(OnClick)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
11 Feb 2013 04:30 PM
Its OBJECT.EVENT:connect(FUNCTION)

And it should be the item you want to change. NOT game.StarterGui... but something like script.Parent
Report Abuse
areaquest2 is not online. areaquest2
Joined: 05 Jun 2010
Total Posts: 196
11 Feb 2013 04:34 PM
I'm sorry that I need all this help but it is the first i ever tried to make. So will this work?

function OnClick()
if Clicked == true then
game.StarterGui.ScreenGui.TextButton.Visible=true
game.StarterGui.ScreenGui.TextBox.Visible=true
end
end

script.Parent.StarterGui.Parent.ScreenGui.Parent.TextButton.connect:(function(OnClick)
Report Abuse
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
11 Feb 2013 04:44 PM
Put this in the screen gui

--[[REMOVED THE IF STATMENT (DOES NOTHING AS CLICKED IS NIL)
REPLACED ALL THE STARTERGUI STUFF WITH THE ACTUAL GUI
FIXED THE CONNECTION LINE]]

function OnClick()
script.Parent.TextButton.Visible=true
script.Parent.TextBox.Visible=true
end

script.Parent.TextButton.MouseButton1Down:connect(OnClick)
Report Abuse
areaquest2 is not online. areaquest2
Joined: 05 Jun 2010
Total Posts: 196
11 Feb 2013 04:49 PM
I used the script you sent and it doesn't work. Is it supposed to be in the textbutton or workspace?
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