chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 01 May 2012 04:14 PM |
No output or anything it is in a local script.
while true do wait(0.001) local seat = script.Parent local camera = Workspace.CurrentCamera.CoordinateFrame.lookVector
if seat.Throttle == 1 then print("go!") script.Parent.Parent.Part.BodyVelocity.velocity = camera*10 end end
|
|
|
| Report Abuse |
|
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 01 May 2012 04:16 PM |
As I said, I don't believe lookvector is part of CoordinateFrame, try using CFrame.
- Cheers! |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 01 May 2012 04:16 PM |
| It is, this works: print(Workspace.CurrentCamera.CoordinateFrame.lookVector) |
|
|
| Report Abuse |
|
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 01 May 2012 04:19 PM |
Is throttle a valid member? (A.k.a is it there? Is it a bool value?)
- Cheers! |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 01 May 2012 04:21 PM |
| Yeah it is. I have no errors in output so I'm not sure here. |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
|
| 01 May 2012 04:23 PM |
I even did: while true do wait(0.001) print("test") local seat = script.Parent local camera = Workspace.CurrentCamera.CoordinateFrame.lookVector
if seat.Throttle == 1 then print("go!") script.Parent.Parent.Part.BodyVelocity.velocity = camera*10 end end
Test does not show up. |
|
|
| Report Abuse |
|
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 01 May 2012 04:24 PM |
This is in a LocalScript?
- Cheers! |
|
|
| Report Abuse |
|
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 01 May 2012 04:25 PM |
Ignore my last post.
- Cheers! |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
| |
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 01 May 2012 04:26 PM |
local seat = script.Parent local camera = Workspace.CurrentCamera.CoordinateFrame.lookvector while wait() do if seat:findFirstchild("Throttle").Value == 1 then -- You were missing .Value print("go!") script.Parent.Parent.Part.BodyVelocity.velocity = camera*10 end end
- Cheers! |
|
|
| Report Abuse |
|
|
MrMcAero
|
  |
| Joined: 21 Apr 2012 |
| Total Posts: 671 |
|
|
| 01 May 2012 04:27 PM |
might need to make the V in lookVector from the code I game you to a capital.
-Stupid Floodcheck
- Cheers! |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 01 May 2012 04:36 PM |
| It looks like the script is in something in the Workspace. Am I right? Because if I am, then that is why it won't work. |
|
|
| Report Abuse |
|
|
chaokid9
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 6187 |
|
| |
|