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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 07 Aug 2008 |
| Total Posts: 2924 |
|
| |
|
TheMyrco
|
  |
| Joined: 13 Aug 2011 |
| Total Posts: 15105 |
|
|
| 20 Oct 2011 12:58 PM |
| Tip; Try defining the items before anything. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
 |
| 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
|
  |
| Joined: 07 Aug 2008 |
| Total Posts: 2924 |
|
| |
|
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 |
|
|
|
| 20 Oct 2011 02:26 PM |
"game.Workspace.launcher.BPosition = BPosition"
ur doin it wrong
go away
this isnt sh |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 21 Oct 2011 12:06 PM |
| http://wiki.roblox.com/index.php/Making_an_onClicked_script |
|
|
| Report Abuse |
|
|
Oysi
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
|
| 21 Oct 2011 12:14 PM |
| ^ ohhh i have that on my computer :D |
|
|
| Report Abuse |
|
|
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 |
|
|