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
 

Re: What is wrong with this varible?

Previous Thread :: Next Thread 
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:20 PM
aaa = Game.Workspace.TestMap.Orange:GetChildren()
BTW Orange is a model. The model consists of bricks. On the developers console it states : "Cannot be valued"???
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:24 PM
Bump!
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:27 PM
BUMPD!
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
25 Aug 2014 02:31 PM
If both TestMap and Orange exist in workspace, there's nothing wrong. There's probably something else wrong... If you can post everything which uses or changes this variable, I can maybe help you out...
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:32 PM
Comon SH >.> This is basic. I need help. Not much work.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:33 PM
NVM ignore that past comment.
Ok scy Imma post now.
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:33 PM
aaa = Game.Workspace.TestMap.Orange:GetChildren()
aaa.CanCollide = false
aaa.Transparency = 1



wuts wrong here?
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:38 PM
bump?
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
25 Aug 2014 02:40 PM
I assume Orange is a Part object right? Look:

object = ... <-- this is supposed to be an object in workspace

aaa = object:GetChildren() <-- This is a table with all the other children objects (that looks like this: {part1,part2,part3,...})

aaa now is a table. This table HAS NOT got a property called CanCollide... :(

This will probably be your solution:

aaa = game.Workspace.TestMap.Orange:GetChildren()

for _,part in pairs(aaa) do --Running code for all child parts in the model orange
if part:IsA("Part") then --Checking if the child object is a part...
part.CanCollide = false --Changing it's property CanCollide
-- and change other stuff if you want...
end --adding end's :P
end

I hope this helps... :|

~sycips~
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:43 PM
1. I see. I made it into a table.
Look I clearly stated, orange is a Model not a object.
It contains lots of parts.
BUMP!
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:44 PM
OH I SEE, you meant to say that it was a model. You're scripting it as if it were a model and in your "--" commentary, you say it is a model. This should help me. Thanks sy. Cya in VN trainings!
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
25 Aug 2014 02:46 PM
A model is an object, so is a part. I didnt know what it was even though that really doesnt matter...

Also, I gave the solution! Why would you Bump it again?
Report Abuse
sycips is not online. sycips
Joined: 21 Mar 2011
Total Posts: 1368
25 Aug 2014 02:46 PM
Haha lol np :P
Report Abuse
rockandgreen is not online. rockandgreen
Joined: 20 Dec 2011
Total Posts: 1161
25 Aug 2014 02:51 PM
Bumped it because I thought you made it as if orange was a part. You said you assumed orange was the Part Object. I was wrong. This should work. Thanks again.
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