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: Something Complex

Previous Thread :: Next Thread 
ZBoyer1000 is not online. ZBoyer1000
Joined: 10 Feb 2013
Total Posts: 271
17 Dec 2015 10:46 PM
local update_time = .3
local num = 1

while wait(update_time) do
local number = game.Workspace.Map:GetChildren()
for i = 1,#number do
if number[i].ClassName == "Part" and number[i].Transparency == 1 and number[i].Anchored == true then
for i = 1,6 do
local vector_direction = Vector3.new(0,0,0)
local direction_table = {"Top","Bottom","Left","Right","Front","Back"}
if num == 1 then vector_direction = Vector3.new(0,4,0) end
if num == 2 then vector_direction = Vector3.new(0,-4,0) end
if num == 3 then vector_direction = Vector3.new(-4,0,0) end
if num == 4 then vector_direction = Vector3.new(4,0,0) end
if num == 5 then vector_direction = Vector3.new(0,0,-4) end
if num == 6 then vector_direction = Vector3.new(0,0,4) end
print(number[i])
if num ~= 7 then
local ray = Ray.new(number[i].Position,vector_direction)
local ignore = number[i]
local block, position, normal = game.Workspace:FindPartOnRay(ray, ignore)
if block and block.Parent:FindFirstChild("Humanoid") == nil and block.Size == number[i].Size then
if number[i]:FindFirstChild(direction_table[num]) ~= nil then
local d = number[i]:FindFirstChild(direction_table[num])
d:remove()
end
elseif block == nil then
if number[i]:FindFirstChild(direction_table[num]) == nil then
local s = game.ReplicatedStorage.Grass:FindFirstChild(direction_table[num]):Clone()
s.Parent = number[i]
end
num = num + 1
if num >= 7 then num = 1 end
end
end
end
end
end
end
--No questions from anyone why I did this.
--I just need some kind of idea by anyone how to fix this error and/or the steps to doing so

23:33:34.840 - Workspace.Script:21: attempt to index field '?' (a nil value)
23:33:34.841 - Stack Begin
23:33:34.843 - Script 'Workspace.Script', Line 21
23:33:34.843 - Stack End
Report Abuse
ZBoyer1000 is not online. ZBoyer1000
Joined: 10 Feb 2013
Total Posts: 271
17 Dec 2015 11:12 PM
I'm guessing that the people who read the code were very confused and just gave up. ;I
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
17 Dec 2015 11:54 PM
maybe your way of asking for help was horrible and nobody wanted to help you

im not going to count which is line 21
Report Abuse
ZBoyer1000 is not online. ZBoyer1000
Joined: 10 Feb 2013
Total Posts: 271
17 Dec 2015 11:58 PM
I'm not stupid I can read error logs.
Report Abuse
sonicboy01 is not online. sonicboy01
Joined: 22 Nov 2008
Total Posts: 923
18 Dec 2015 12:01 AM
Actually no one can be bothered reading and understanding that code.
Report Abuse
StartDeveloping is not online. StartDeveloping
Joined: 16 Feb 2015
Total Posts: 740
18 Dec 2015 12:23 AM
Well if you only told us what it does, how you want it to go vs real outcome, and where tf is line 21, then we can help.
Report Abuse
ZBoyer1000 is not online. ZBoyer1000
Joined: 10 Feb 2013
Total Posts: 271
18 Dec 2015 12:46 AM
Good news, I can't even understand the code completely either. I just posted it for some kind of support for learning how to do it more efficiently.
Report Abuse
ZBoyer1000 is not online. ZBoyer1000
Joined: 10 Feb 2013
Total Posts: 271
18 Dec 2015 12:53 AM
I posted a modified version of my old script in the forums. It works great for mining games or something.
Report Abuse
chimmmihc is not online. chimmmihc
Joined: 24 Jul 2014
Total Posts: 2420
18 Dec 2015 06:02 AM
Why does this do? What is line 21? And why don't you comment code?
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
18 Dec 2015 06:37 AM
This isn't complex at all, acting cocky will not get your help.

Here's your problem:

local ignore = number[i]


number[i] is nil.
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