|
| 19 Apr 2013 06:49 PM |
19:47:13.321 - X cannot be assigned to 19:47:13.322 - Script "Workspace.Jeep.VehicleSeat.vehicleMove", Line 6 19:47:13.322 - stack end 19:47:13.323 - Disconnected event because of exception
speed = 60000.000
function throC(property) if property == "Throttle" then if script.Parent.Throttle == 1 then script.Parent.BodyForce.force.X = speed else script.Parent.BodyForce.force.X = -speed end end end
script.Parent.Changed:connect(throC)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 19 Apr 2013 07:12 PM |
I'm not sure if this will work, but try this:
speed = 60000.000
function throC(property) if property == "Throttle" then if script.Parent.Throttle == 1 then force = script.Parent.BodyForce.force force.X = speed else force = script.Parent.BodyForce.force force.X = speed * -1 end end end
script.Parent.Changed:connect(throC) |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 07:28 PM |
got this error
20:28:00.451 - X cannot be assigned to 20:28:00.452 - Script "Workspace.Jeep.VehicleSeat.vehicleMove", Line 30 20:28:00.453 - stack end 20:28:00.453 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 07:31 PM |
Maybe this?
speed = 60000.000
function throC(property) if property == "Throttle" then if script.Parent.Throttle == 1 then bforce = script.Parent.BodyForce bforce.force = Vector3.new(speed, bforce.force.Y, bforce.force.Z) else bforce = script.Parent.BodyForce bforce.force = Vector3.new((speed * -1), bforce.force.Y, bforce.force.Z) end end end
script.Parent.Changed:connect(throC) |
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 07:40 PM |
It's telling u that X cannot be assigned to, because .x cannot be assigned to. But u may make a Vector3, with a .x in it (as well as a .y & .z), and stuuf that into any other Vector3.
Looks like Waffles did that, but I have never seen .X, before.
Bri
|
|
|
| Report Abuse |
|
|
|
| 19 Apr 2013 07:42 PM |
Looks like
"speed = 60000.000
function throC(property) if property == "Throttle" then if script.Parent.Throttle == 1 then bforce = script.Parent.BodyForce bforce.force = Vector3.new(speed, bforce.force.Y, bforce.force.Z) else bforce = script.Parent.BodyForce bforce.force = Vector3.new((speed * -1), bforce.force.Y, bforce.force.Z) end end end
script.Parent.Changed:connect(throC)"
works. thanks |
|
|
| Report Abuse |
|
|