Ok the problem was it wasn't working yesterday in play mode but in build mode it worked then I converted it to local script and it worked. Now it won't work for some reason and it's a local script.
script.Parent.BodyPosition.position = script.Parent.Position script.Parent.BodyGyro.cframe = CFrame.fromEulerAnglesXYZ(0,3.14,0) value1 = 0 while true do wait() if script.Parent.Throttle== 1 then if value1 < 41 then value1 = value1+1 end script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1 end if script.Parent.Throttle == 0 then value1 = 0 script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1 end if script.Parent.Throttle== -1 then if value1<31 then value1 = value1+1 end script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*-value1 end if script.Parent.Steer == 1 then script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.1,0) end if script.Parent.Steer == -1 then script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,.1,0) end end
-Vetexgames
Try putting a wait() before everything else. That's a problem with localscripts for some reason I dunno. You're also missing an end. Another thing is that localscripts only run in the playergui/backpack or character model.
wait() script.Parent.BodyPosition.position = script.Parent.Position script.Parent.BodyGyro.cframe = CFrame.fromEulerAnglesXYZ(0,3.14,0) value1 = 0 while true do wait() if script.Parent.Throttle== 1 then if value1 < 41 then value1 = value1+1 end script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1 end if script.Parent.Throttle == 0 then value1 = 0 script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1 end if script.Parent.Throttle== -1 then -- This doesn't have an end to it if value1<31 then value1 = value1+1 end script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*-value1 end -- If it stops here, put an end here if script.Parent.Steer == 1 then script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.1,0) end -- If it stops here, put an end here if script.Parent.Steer == -1 then script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,.1,0) end -- If it stops here, put an end here end