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 » Scripters
Home Search
 

Re: FocusLost

Previous Thread :: Next Thread 
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
17 May 2016 02:52 PM
script.Parent.FocusLost:connect(function(enter)
if enter and script.Parent.Text:lower() == "color" then
print("test")
end
end)




what's wrong?
works in studio, but not in game..
Report Abuse
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
17 May 2016 02:53 PM
b1

need an answer :P
Report Abuse
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
17 May 2016 02:55 PM
b2
Report Abuse
ExtremeBuilder15 is not online. ExtremeBuilder15
Joined: 01 May 2012
Total Posts: 3176
17 May 2016 02:59 PM
just a question, what do you mean to accomplish by having enter as a parameter?
Report Abuse
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
17 May 2016 03:00 PM
If I type "color" inside the textbox, and press enter it should print "test"
apparently it works on studio, but not in game.
Report Abuse
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
17 May 2016 03:01 PM
b3
Report Abuse
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
17 May 2016 03:03 PM
nvm, wiki says I should use in local script.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
17 May 2016 03:17 PM
yes you should use in localscript. all scripts inside GUIs should be local


Report Abuse
WeirdGuyHere is not online. WeirdGuyHere
Joined: 20 Oct 2012
Total Posts: 1349
19 May 2016 05:53 AM
all scripts?

so if I had a normal script with one line that says print("hi")
it wont work in online mode?
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
19 May 2016 07:47 AM
It would normally, but that doesn't mean it's a good thing.
Roblox is kind of a joke when it comes to client and server behavior, or at least it used to be. It's getting better, and that seems to be the biggest thing that has caused games to break.
Anyhow, Guis are client-sided. They should be handled by LocalScripts. Same with keyboard and mouse input. Handle it on the client. Then if you need the server for something, send a signal by RemoteEvent or RemoteFunction. Don't just tell the server "I pressed the 'h' key!", because then you're still mostly doing it on the server.
This causes input latency and is improper.


Also if you are using FilteringEnabled (Eliminates the jokiness I mentioned earlier), it is REQUIRED that you use LocalScripts.


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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