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: Script only works in Studio

Previous Thread :: Next Thread 
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 07:05 AM
This script is in a LocalScript, and only seems to work in Test in Studio. Could anyone help?

search = script.Parent.Parent.TextBox
NotInDatabase = game.Players.LocalPlayer.PlayerGui.Database.NotInDatabase

function onClicked()
if search.Text == "fear" or search.Text == "FEAR" then
game.Players.LocalPlayer.PlayerGui.Database.GroupGui.OriginalFEAR.Visible = true
else NotInDatabase.Visible = true
end
end

script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
02 Mar 2013 07:07 AM
Hrs, try adding a wait(1) at the start
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 07:12 AM
I added a wait(1) after the function onClicked() line, is that what you ment? Or before that?
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
02 Mar 2013 07:13 AM
Way before
The very top
Report Abuse
Infocus is not online. Infocus
Joined: 28 Apr 2011
Total Posts: 8022
02 Mar 2013 07:13 AM
Or what you did was fine
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 07:15 AM
Tried both ways, neither worked.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 07:21 AM
Bump, any help?
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 08:36 AM
Bumping again, please could somebody help, this has never happened to me before.
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 09:27 AM
Heeeeeeelp
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 09:56 AM
Please help. this is really frustrating me, why does this only work in Studio?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
02 Mar 2013 10:10 AM
wait() -- All. LocalScripts. NEED THIS HERE.
Player = game.Players.LocalPlayer
search = script.Parent.Parent.TextBox
NotInDatabase = Player.PlayerGui.Database.NotInDatabase

function onClicked()
if search.Text:lower()=="fear" then -- Learn about string.lower on the wiki, just search string manipulation
Player.PlayerGui.Database.GroupGui.OriginalFEAR.Visible = true
else NotInDatabase.Visible = true
end
end

script.Parent.MouseButton1Down:connect(onClicked)
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
02 Mar 2013 10:14 AM
Yes! Thank you
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
02 Mar 2013 10:15 AM
You're welcome :3
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