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 » Game Design
Home Search
 

Re: If script.Parent.Text == something then

Previous Thread :: Next Thread 
hdtv13 is not online. hdtv13
Joined: 18 Sep 2012
Total Posts: 1628
31 Dec 2014 11:28 AM
How would i make this script detect if the text box has a certain number in it e.g
109 and if it has it removes the gui

script.Parent.Submit.MouseButton1Click:connect(function()
if script.Parent.ID.Text == 109 then
script.Parent.Parent:remove()
end
end)

Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
31 Dec 2014 11:34 AM
You're trying to compare a string with a number.

if script.Parent.ID.Text == "109" then
Report Abuse
hdtv13 is not online. hdtv13
Joined: 18 Sep 2012
Total Posts: 1628
31 Dec 2014 11:40 AM
Oh thanks

Thanks! HDTV13 - Chief of BTP Posting failed = 97x64 (Error user logged out)
Report Abuse
Scriptos is online. Scriptos
Joined: 17 Jun 2008
Total Posts: 2900
31 Dec 2014 12:07 PM
You can do;

script.Parent.ID.Text == 109

if tonumber(script.Parent.Id.Text) == 109 then


tonumber() converts a string to an integer.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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