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
 

Error: attempt to index local 'e' a boolean value

Previous Thread :: Next Thread 
NICKIMINAJQUEEN0 is not online. NICKIMINAJQUEEN0
Joined: 16 Jan 2017
Total Posts: 195
22 Apr 2017 09:50 AM
for i, v in pairs(script.Parent:GetChildren()) do
local e = v.Name:sub(1,4) == "Part" -- Looks for the brick that has the name"Part"
e.BrickColor = BrickColor.Red()
end

I don't understand how I got the script wrong. Please help me.

Thanks
NICKIMINAJQUEEN0

Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
22 Apr 2017 09:53 AM
for i, v in pairs(script.Parent:GetChildren()) do
if v.ClassName == 'Part' then
v.BrickColor = BrickColor.new('Red')
end
end
Report Abuse
NICKIMINAJQUEEN0 is not online. NICKIMINAJQUEEN0
Joined: 16 Jan 2017
Total Posts: 195
22 Apr 2017 10:03 AM
k thx
Report Abuse
SquidyBroh is not online. SquidyBroh
Joined: 08 Jul 2015
Total Posts: 221
22 Apr 2017 10:11 AM
--Checks the name instead of ClassName, just in case that's what you need.
for i, v in pairs(script.Parent:GetChildren()) do
if v.Name == "Part" then
v.BrickColor = BrickColor.new('Red')
end
end



Report Abuse
NICKIMINAJQUEEN0 is not online. NICKIMINAJQUEEN0
Joined: 16 Jan 2017
Total Posts: 195
23 Apr 2017 12:00 PM
k, is there a way I can turn that into a variable?
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