It bounced when I script it how can I make it stable so when I stop it with a script it does not bounce
Stop : s = script g = game.Workspace Car = s.Parent.Parent.Car1
function onClicked() Car.BodyAngularVelocity.angularvelocity = Vector3.new( 0, 0, 0)
script.Parent.Parent.Left.BrickColor = BrickColor.new("Bright green") script.Parent.BrickColor = BrickColor.new("Really red") script.Parent.Parent.Right.BrickColor = BrickColor.new("Bright green") end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Left : s = script g = game.Workspace Car = s.Parent.Parent.Car1
function onClicked() Car.BodyAngularVelocity.angularvelocity = Vector3.new( 0, 0, 4)
script.Parent.BrickColor = BrickColor.new("Lime green") script.Parent.Parent.Stop.BrickColor = BrickColor.new("Bright red") script.Parent.Parent.Right.BrickColor = BrickColor.new("Bright green") end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
and right : s = script g = game.Workspace Car = s.Parent.Parent.Car1
function onClicked() Car.BodyAngularVelocity.angularvelocity = Vector3.new( 0, 0, -4)
script.Parent.BrickColor = BrickColor.new("Lime green") script.Parent.Parent.Stop.BrickColor = BrickColor.new("Bright red") script.Parent.Parent.Left.BrickColor = BrickColor.new("Bright green") end script.Parent.ClickDetector.MouseClick:connect(onClicked)