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: Lua question, does this work?

Previous Thread :: Next Thread 
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:33 PM
for i, v in pairs(game.Lighting:GetChildren())
if v:IsA("Model") then
if game.Workspace.CurrentCamera.v.Owned.Value == 1 then
v = nil

Now, is there a certain way to include a variable into a path finding? Because I know

game.Workspace.CurrentCamera.v.Owned.Value

Won't work. It'll just see if there's something named v in CurrentCamera. Can somebody help me?
Report Abuse
wolverine12 is not online. wolverine12
Joined: 20 Aug 2008
Total Posts: 1100
22 Jan 2013 11:33 PM
i dont think there is anything in CurrentCamera with the name v
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
22 Jan 2013 11:36 PM
Are you trying to pathfind, and adding objects that the path will pass through?
Or trying to make objects local.
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:37 PM
Er... that's not the question I asked. I was wondering if you could make v equal the variable.

v = Anything that's a model in lighting.

I was wondering if I could somehow implement that into

game.Workspace.CurrentCamera.v
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:38 PM
game.Workspace.CurrentCamera.v.Owned.Value

I want to know if it's possible to make that, not v, but the variable that v equals.
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
22 Jan 2013 11:39 PM
UHHHHH

ObjectValue?
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:41 PM
Hmm... I'm not sure if you're right or not getting it. Let me explain thoroughly, one more time.

game.Workspace.CurrentCamera."v"

Now it's going to search for the name "v" in CurrentCamera. Instead is there a way I could actually make it's variable? So it searches for... example: "DarkKnight"
game.Workspace.CurrentCamera.v(=DarkKnight)
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
22 Jan 2013 11:43 PM
Well, you could try naming V the subject, and having the code search for the object type of v.
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:45 PM
I'd like if you could explain more, or lead me somewhere to read about ObjectValues. I'm new with scripting. I've never used an Object Value before. Is there a wiki page for it, possibly?
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
22 Jan 2013 11:50 PM
An object value is a value that holds a link to a model in the game.
When you enter the .Value of the object, you are going to the model it links to.
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:54 PM
So how would I write that? It wouldn't be
game.Workspace.CurrentCamera.ObjectValue.Value.
Hm, wait. If I stuck the ObjectValue into CurrentCamera I could do that, and I think that would make it work. Wouldn't it?
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
22 Jan 2013 11:56 PM
game.Workspace.CurrentCamera.ObjectValue.Value = v

then objectvalue.value IS v.

You tell me bro.
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
22 Jan 2013 11:57 PM
Gonna try it, hold on.
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
23 Jan 2013 12:17 AM
Well it seems to be working, but... not exactly.
Report Abuse
jrf2112 is not online. jrf2112
Joined: 29 Jun 2008
Total Posts: 3354
23 Jan 2013 12:18 AM
JUST WORK!
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
23 Jan 2013 12:21 AM
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

THE PROBLEM IS SETTING THE OBJECTVALUE TO v IS ALMOST MAKING IT GO TO game.Lighting.NameHere.

I THOUGHT
game.Workspace.CurrentCamera.SeeIfOwned.Value.Owned.Value
WOULD WORK
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
23 Jan 2013 12:22 AM
IS MAKING IT GO TO
game.Lighting.NameHere.*

NOT ALMOST

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Report Abuse
1WOOF1 is not online. 1WOOF1
Joined: 03 May 2009
Total Posts: 20682
23 Jan 2013 02:03 AM
[ Content Deleted ]
Report Abuse
theswanton is not online. theswanton
Joined: 13 Oct 2008
Total Posts: 62
23 Jan 2013 09:22 AM
Thank you, I was wondering if v.Name would work in this situation.
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