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
 

Variables not being recognized, help neede

Previous Thread :: Next Thread 
rollercoaster57 is not online. rollercoaster57
Joined: 06 Nov 2010
Total Posts: 67
29 Oct 2014 10:50 PM
So I am working a completely custom chat gui, from one player to another. Now, I have come across this one issue, which I usually fix by making it a global variable, but is refusing to work right now. The output is ...LocalScript: 11: Attempt to Index Field 'fr' (a nil value!)
heres the lines leading up to line 11:
typed = false
print("RUNNING ".. script.Parent.Name .." function script.")
_G.fr = script.Parent.Parent:findFirstChild("body")
script.Parent.FocusLost:connect(function(t)
print("Focus Lost")
if typed == false then
print("typed = false")
if t == true then
print("Focus is definitly lost.")
typed = true
for _,v in pairs(_G.fr:getChildren("TextLabel")) do

if you want more, i may or may not post the rest. I don't think you need more though.
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
29 Oct 2014 10:53 PM
show me where you declare _G.fr and also is the declaration in a script or localscript?
the environments are different.


semicolons are love, semicolons are life
Report Abuse
rollercoaster57 is not online. rollercoaster57
Joined: 06 Nov 2010
Total Posts: 67
29 Oct 2014 11:00 PM
third line,under:
typed = false
print("RUNNING ".. script.Parent.Name .." function script.")
and yeah, i know they are different, this doesn't work online, but does on studio. Local
Script. I don't get why it won't work.
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