|
| 15 Jul 2011 12:46 PM |
Velocity apparenctly doesn't have the .Changed function in it, so how do I make it a number?
Kid = script.Parent.Parent.Parent.Parent.Parent.Character
repeat wait(1) until Kid:FindFirstChild("Car") ~=nil
Kid.Car.Seat.Velocity.Changed:connect(function () script.Parent.Text = "Speed: " ..Kid.Car.Seat.Velocity end) |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 12:48 PM |
Properties don't have events, objects do.
Kid.Car.Seat.Changed:connect(function(p) if p == 'Velocity' then script.Parent.Text = "Speed: " ..Kid.Car.Seat.Velocity end end) |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2011 12:51 PM |
| Script runs, bot it doesn't seem to do anything now. |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 12:52 PM |
| Maybe because the Velocity isn't changing? |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2011 12:53 PM |
Continues to constantly print "3" in the outpt
Kid = script.Parent.Parent.Parent.Parent.Parent.Character print("1") repeat wait(1) until Kid:FindFirstChild("Car") ~=nil print("2") Kid.Car.Seat.Changed:connect(function(p) print("3") if p == 'Velocity' then print("4") script.Parent.Text = "Speed: " ..Kid.Car.Seat.Velocity print("5") end end) |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 12:53 PM |
| Yeah, probably because the Velocity isn't changing. |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 12:54 PM |
| Is this a "Seat" or a "VehicleSeat"? |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2011 12:55 PM |
| Well the vehicle is moving |
|
|
| Report Abuse |
|
|
| |
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 12:56 PM |
| Is the Velocity changing however? Check with the explorer. |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2011 12:58 PM |
| For some reason it isn't no. |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 12:59 PM |
| Well then that's your problem; see if there is another property that you can latch onto, like RotVelocity. |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2011 01:01 PM |
| Nothing seems to be changing in the properties, not even the position, I don't know why. |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 01:02 PM |
| That's odd. Just try using "Position" instead of "Velocity". See if it works. |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2011 01:04 PM |
| No, nothing is working. I guess I'll just scrap this. |
|
|
| Report Abuse |
|
|
Camoy
|
  |
| Joined: 21 May 2009 |
| Total Posts: 6207 |
|
|
| 15 Jul 2011 01:05 PM |
| yeah... I would suggest using a VehicleSeat for movement and making sure the HeadsUpDisplay is enabled. Much easier. |
|
|
| Report Abuse |
|
|