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: Parent is a nil value

Previous Thread :: Next Thread 
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 12:28 PM
scripts seem unable to find objects now. Scripts in a regular part with script.Parent will sometimes get Parent is a nil value when run, and game.Workspace.somepart and script.Part.BodyVelocity also turn up nil. Can anyone give some advice?
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 12:43 PM
........
Come on
The basic part of Lua is no longer working, maybe someone could help.
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
20 Oct 2011 12:46 PM
I'm not amused, me not helpy, for now...
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 12:48 PM
Not amused? What?
Report Abuse
TheMyrco is not online. TheMyrco
Joined: 13 Aug 2011
Total Posts: 15105
20 Oct 2011 12:58 PM
Tip; Try defining the items before anything.
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 01:24 PM
game.Workspace.launcher.BPosition = BPosition

Error:BPosition is not a valid member of part

And I've checked, BPosition is definatly part of launcher.
Report Abuse
Catblox is not online. Catblox
Joined: 23 Apr 2008
Total Posts: 2223
20 Oct 2011 01:30 PM
BPosition = game.Workspace.launcher.BPosition

Remember, the format is:

variable = object

NOT

object = variable
Report Abuse
sdfgw is not online. sdfgw
Top 50 Poster
Joined: 08 Jan 2009
Total Posts: 41681
20 Oct 2011 01:33 PM
If you're cloning objects with scripts in, it's because the scripts load before the objects.
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 02:24 PM
@cat
Wrong.
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 02:25 PM
@cat

While i would use BPosition = Vector3.new(0, 0, 0)
I have always used tagging the other way round.
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
20 Oct 2011 02:26 PM
"game.Workspace.launcher.BPosition = BPosition"

ur doin it wrong

go away

this isnt sh
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 02:28 PM
script.Parent.Parent.VehicleSeat = seat
script.Parent.force = force
script.Parent.Spd.Value = Spd
script.Parent.Dir.Value = Dir

script.Parent.Parent.VehicleSeat.Throttle.Changed:connect (function(prop)
if script.Parent.Parent.VehicleSeat.Throttle == 1 then
Spd = 12
Dir = 1
else if script.Parent.Parent.VehicleSeat.Throttle == 0 then
Dir = 0
else if script.Parent.Parent.VehicleSeat.Throttle == -1 then
Spd = 12
Dir = -1
end
end
end
end)

The top tag on this dosnt work but the other tags do. I tried swapping it round and it just broke.
Report Abuse
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
20 Oct 2011 02:30 PM
Since you obviously don't understand how to use variables, a basic concept in scripting, go to scripting helpers >_<
Report Abuse
EverquestI is not online. EverquestI
Joined: 03 Feb 2011
Total Posts: 11109
20 Oct 2011 02:33 PM
The syntax is

Tag = Location

i.e.

Banana = game.Workspace.Pinecone

print(Banana.Name)

>Pinecone

-This post was bought to you by: Molten "Washing machines burn faster with molten!"
Report Abuse
Danster5oo is not online. Danster5oo
Joined: 27 Aug 2010
Total Posts: 10003
20 Oct 2011 02:34 PM
'script.Parent.Spd.Value = Spd'
script.Parent.Spd is number value, correct? Global Spd is now script.Parent.Spd.Value

- The naked old man who is possibly chocolate...
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
20 Oct 2011 03:00 PM
Sorry for being arrogant, and thanks for helping. Although, Ive noticed onClicked wont fire is studio mode, Im sure this hasnt always been the case has it? Anyway, thanks.
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
20 Oct 2011 06:59 PM
@mad

*Facepalm* to do that yo-

wait

there's a thread on the wiki

your question is asked (the one above me)
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
21 Oct 2011 09:24 AM
@baby
Asked? Wiki? ...? I looked at onClick on the wiki and it didnt say anything about that. Oh well. Ill look again.
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
21 Oct 2011 12:06 PM
http://wiki.roblox.com/index.php/Making_an_onClicked_script
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
21 Oct 2011 12:12 PM
[ Content Deleted ]
Report Abuse
babyzander44 is not online. babyzander44
Joined: 14 Aug 2011
Total Posts: 756
21 Oct 2011 12:14 PM
^ ohhh i have that on my computer :D
Report Abuse
madattak is not online. madattak
Joined: 07 Aug 2008
Total Posts: 2924
21 Oct 2011 01:38 PM
@baby
Couldnt find anything about not working in studio. Thats what I was looking at for my script.
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