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: Variable a Nil Value

Previous Thread :: Next Thread 
healthymoses6 is not online. healthymoses6
Joined: 14 Dec 2012
Total Posts: 45
29 Jul 2017 11:45 PM
I made a different post about this, but I decided to make a new one to simplify my problem. Here is the output and the script:

00:20:07.677 - Workspace.First Class Suite.Seat.System.Frame.Script:9: attempt to index global 'exist' (a nil value)
00:20:07.679 - Stack Begin
00:20:07.682 - Script 'Workspace.First Class Suite.Seat.System.Frame.Script', Line 9
00:20:07.685 - Stack End


exist = script.Parent.Parent:WaitForChild('Seat').Value
first = exist.Parent

--
for some reason, it says that "exist" is a nil value when it is clearly a variable, the value is an object value tied to a brick. All of this is inside of a GUI. I check my parents and childs a couple of times and they are all correct.. what do I do?
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
30 Jul 2017 12:05 AM
The Value hasn't been set yet.
Report Abuse
healthymoses6 is not online. healthymoses6
Joined: 14 Dec 2012
Total Posts: 45
30 Jul 2017 09:00 AM
The value was set using a different script, and when I checked by running in studio the value was set
Report Abuse
healthymoses6 is not online. healthymoses6
Joined: 14 Dec 2012
Total Posts: 45
30 Jul 2017 01:00 PM
bump
Report Abuse
healthymoses6 is not online. healthymoses6
Joined: 14 Dec 2012
Total Posts: 45
30 Jul 2017 01:54 PM
bump2- someone please help
Report Abuse
sonihi is not online. sonihi
Joined: 27 Jun 2009
Total Posts: 3655
30 Jul 2017 01:55 PM
they're probably asyncronised
Report Abuse
healthymoses6 is not online. healthymoses6
Joined: 14 Dec 2012
Total Posts: 45
30 Jul 2017 01:58 PM
? What does that mean? For some reason it is saying my variable doesn't exist, when the script clearly has the variable being defined
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
30 Jul 2017 03:51 PM
Do you know how to check if the value exists? By the same procedure as you did in your script, and it shows that it doesn't exist.
Report Abuse
gaberocksall is not online. gaberocksall
Joined: 23 Apr 2016
Total Posts: 207
30 Jul 2017 03:59 PM
exist is a Value, a value doesn't have a parent lol
"first = script.Parent.Parent:WaitForChild('Seat').Value.Parent"
".Value.Parent" does that make sense? Simple error,
try this


exist = script.Parent.Parent:WaitForChild('Seat').Value
first = script.Parent.Parent:WaitForChild('Seat').Parent
Report Abuse
gaberocksall is not online. gaberocksall
Joined: 23 Apr 2016
Total Posts: 207
30 Jul 2017 04:00 PM
Or even better,

exist = script.Parent.Parent:WaitForChild('Seat').Value
first = script.Parent.Parent
Report Abuse
BunnyBoy26 is not online. BunnyBoy26
Joined: 17 Jun 2010
Total Posts: 5674
30 Jul 2017 06:16 PM
^ Way to throw a ball and miss the ground.
Report Abuse
healthymoses6 is not online. healthymoses6
Joined: 14 Dec 2012
Total Posts: 45
30 Jul 2017 07:17 PM
The value does have a parent, it is an object value, and as such it is bound to a certain object. That object has a parent and thats what im after.
Report Abuse
gaberocksall is not online. gaberocksall
Joined: 23 Apr 2016
Total Posts: 207
02 Aug 2017 01:38 PM
sorry i didn't read the whold post, i thought it was a number value.
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