|
| 09 Jan 2014 07:54 PM |
r = game.Workspace.MannedRocket.Seat:findFirstChild("Humanoid") function onTouched(Seat) if r~=nil then game.Workspace.MannedRocket.Seat.BodyVelocity.velocity = Vector3.new(0,4000,0)--This part probably broken end end RocketScript.Parent.Touched:connect(onTouched) ------------------------------------------------------------------------------------------------------------------ Not sure why it doesn't work, can anyone help me? |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 07:55 PM |
Next time read the output!
BodyVelocity.velocity
CAPITOLS!
BodyVelocity.Velocity |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 07:56 PM |
| In the properties Velocity isn't capitol.. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 07:59 PM |
wtf
Anyway your whole set up is really bad. I would recomend trying simpler things for now. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:00 PM |
| How do you recommend I do it? How is my format bad? I'm fairly new to scripting...as you can see. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 08:01 PM |
First when the person sits on seat. Give them a tool, than in the tool On button down, Click and other things to make it do things..
Trust me its more complicated that It sounds like. But you can try. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:04 PM |
| First I just want it to go up before I do anything. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:04 PM |
RocketScript.Parent.Touched:connect(onTouched)
Is 'RocketScript' defined? |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:04 PM |
| So is there anything else wrong with it? |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 08:05 PM |
"it to go up"?
I still would recommend what I said becuase you would have to remove the script you made.
|
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:05 PM |
"I'm fairly new to scripting"
*Looks at username*
ANYWAYS THE PROBLEM IS THAT r is NIL. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:06 PM |
| Rocketscript is in a part, if thats what your asking. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:08 PM |
| R is nil if nobody is touching it. If someone touched it, it isn't nil anymore, therefore it should liftoff. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 08:09 PM |
| You have to have it never nil. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:09 PM |
| That script is way easier to make than a fully controlled vehicle. If I can't get it to simple go up, I can't really do anything with it. |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:10 PM |
| If its never nil then it'd takeoff as soon as the game loads, not what I want. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 08:12 PM |
... I will fix it
function onTouched(part) wait(1) if part.Parent:FindFirstChild("Humanoid")then script.Parent.BodyVelocity.velocity = Vector3.new(0,4000,0) script.Parent.BodyVelocity.maxforce = Vector3.new(0,10000,0)4 end script.Parent.Touched:connect(onTouched)
Okay perfect.
|
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:13 PM |
| r is always nil sir. Even if a player comes along and sits on it, its still nil |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:16 PM |
| It isn't nil anymore if someone touches it...at least thats what I want it to do. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 08:17 PM |
JUST. USE. MINE.
I will test it FOR you and tell you IT WORKS. |
|
|
| Report Abuse |
|
|
mic144
|
  |
| Joined: 14 Oct 2009 |
| Total Posts: 1598 |
|
|
| 09 Jan 2014 08:17 PM |
script.Parent.Touched:connect(function(hit) human = hit.Parent:FindFirstChild('Humanoid') or hit.Parent.Parent:FindFirstChild('Humanoid') if human ~= nil then yourcode end end)
-- $$ Get on my level, here use this ladder. Don't fall down on the way up! $$ -- |
|
|
| Report Abuse |
|
|
|
| 09 Jan 2014 08:18 PM |
| The script didn't work...you put a 4 next to maxforce, and there's a red line over the connection line.. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 09 Jan 2014 08:18 PM |
| Remove the 4 at the end of the line. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
|
| 09 Jan 2014 08:22 PM |
| You know what? I'll give it a try another day. Thanks for trying guys. |
|
|
| Report Abuse |
|
|