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: Nil value?

Previous Thread :: Next Thread 
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 01:54 PM
Why does this:

if game.Players:FindFirstChild(script.Parent.Parent.Parent.Parent.Parent.Parent.Owner.Value).TotalDrones.Value == 1 then

say it's a nil value?

"Owner" is a StringValue with the name of the player in it. TotalDrones is in the player




--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 02:31 PM
Any help why it does that?


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 02:35 PM
error: "Attempt to index a nil value"

But it does exist so why does it say it's a nil value?


--RoKjell--
Report Abuse
imalex4 is not online. imalex4
Joined: 16 Aug 2012
Total Posts: 48
06 Sep 2015 02:40 PM
There is not enough info for us to help. I don't know what script or parent or TotalDrones is. Also, I don't know what you mean by "Owner is a StringValue with the name of the player in it." How does a string value store something like that? This question is really confusing.
Report Abuse
AdvancedDrone is online. AdvancedDrone
Joined: 17 Apr 2010
Total Posts: 2599
06 Sep 2015 02:43 PM
total drones ⊙ ͜ʖ ͡⊙



When the beat drops I'm like: ( ͡° ͜ʖ ͡°) ( ͡⊙ ͜ʖ ͡⊙) ( ͡◉ ͜ʖ ͡◉)
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 02:54 PM
script:

while true do
wait()
if game.Players:FindFirstChild(script.Parent.Parent.Parent.Parent.Parent.Parent.Owner.Value).TotalDrones.Value == 1 then

script.Parent.Drone1.Visible = true

end
end


TotalDrones is an intValue stored in the player, will later be able to save.

Family Tree:

Tycoon1 (model)
Owner (StringValue) -- The name of the owner of that tycoon is in here.
HeadComputer (part)
SurfaceGui
MainFrame (Frame)
HeadComputer (Frame)
SendDrones (Frame)
DroneVisible (The script)

Ask me if you need more info



--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 03:05 PM
bump


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 03:18 PM
Cmone, someone must know it


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 03:56 PM
Anyone?


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 04:05 PM
bump


--RoKjell--
Report Abuse
ScrewDeath is not online. ScrewDeath
Joined: 03 Jun 2012
Total Posts: 2700
06 Sep 2015 04:08 PM
try
key = script.Parent.Parent.Parent.Parent.Parent.Parent.Owner.Value
if game.Players:FindFirstChild(key)and game.Players:FindFirstChild(key).TotalDrones.Value == 1 then
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
06 Sep 2015 04:25 PM
That part seems to work now but this thing doesnt.

wait(1)
key = script.Parent.Parent.Value
script.Parent.Value = game.Players:FindFirstChild(key).TotalDrones.Value

This is inside that Owner Value


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
07 Sep 2015 12:14 AM
Help :S


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
07 Sep 2015 12:20 AM
Nobody?


--RoKjell--
Report Abuse
Quebankus is online. Quebankus
Joined: 25 Aug 2011
Total Posts: 846
07 Sep 2015 01:05 AM
script.Parent.Parent.Parent.Parent.Parent.Parent

start fixing this please

--Quebankus
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
07 Sep 2015 09:42 AM
What's wrong about that? It only means there are many parents.


--RoKjell--
Report Abuse
RoKjell is not online. RoKjell
Joined: 22 Nov 2012
Total Posts: 1205
07 Sep 2015 09:42 AM
And that part is fixed, look at this part now:

wait(1)
key = script.Parent.Parent.Value
script.Parent.Value = game.Players:FindFirstChild(key).TotalDrones.Value


--RoKjell--
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