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: is lighting not an official class

Previous Thread :: Next Thread 
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
24 Sep 2013 09:55 PM
scenario, I stuck a model in lighting, named brick, containing 1 brick. I made a button with a script that drags it out of lighting and puts it on top of the "pad brick"

function onTouched()
local nxt = game.Lighting.brick
nxt.Parent = script.Parent.Parent.Parent
nxt:MoveTo(script.Parent.Parent.Parent.pad.Position, script.Parent.Parent.Parent.pad)
end

script.Parent.Touched:connect(onTouched)

error - Brick is not a valid member of Lighting
*does what I want it to do anyways
yellow text - Disconnected because of an exception

what the heck?
Report Abuse
JoshuaKempfert is not online. JoshuaKempfert
Joined: 16 Feb 2013
Total Posts: 2407
24 Sep 2013 09:57 PM
Try :findFirstChild()
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
24 Sep 2013 09:59 PM
I did
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
24 Sep 2013 10:01 PM
its giving back nil
Report Abuse
Usering is not online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
24 Sep 2013 10:19 PM
Is the brick named "brick" or "Brick?" It is finding Lighting but it can't find the object you want.
Report Abuse
randomsmileyface is not online. randomsmileyface
Joined: 01 Aug 2010
Total Posts: 4538
24 Sep 2013 10:22 PM
good point
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