DuskC
|
  |
| Joined: 26 Oct 2009 |
| Total Posts: 37 |
|
|
| 22 Jun 2013 10:04 PM |
So I've built this Canoe, and I tried the traditional way of floating on Roblox, but it just kept sinking. so I added this script for a seat and it sort of works. The only problem is that the Canoe always sinks a ways below where I place it on the Water the floats. Help? If you would like to try it out, it's in my free models.
Script: script.Parent.MaxSpeed = 30 maxspeed =script.Parent.MaxSpeed script.Parent.BodyPosition.position = script.Parent.Position
script.Parent.BodyGyro.cframe = script.Parent.CFrame value1 = 0 while true do wait() if script.Parent.Throttle== 1 then if value1 < maxspeed then value1 = value1+1 end script.Parent.Parent.Driving.Value = true script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1 script.Parent.Parent.Left.Value = false script.Parent.Parent.Right.Value = false end if script.Parent.Throttle == 0 then value1 = 0 script.Parent.Parent.Driving.Value = false script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*value1 script.Parent.Parent.Left.Value = false script.Parent.Parent.Right.Value = false end if script.Parent.Throttle== -1 then if value1<31 then value1 = value1+1 end script.Parent.Parent.Driving.Value = true script.Parent.BodyVelocity.velocity = script.Parent.CFrame.lookVector*-value1 script.Parent.Parent.Left.Value = false script.Parent.Parent.Right.Value = false end if script.Parent.Steer == 1 then script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,-.01,0) script.Parent.Parent.Driving.Value = true script.Parent.Parent.Right.Value = true script.Parent.Parent.Left.Value = false end if script.Parent.Steer == -1 then script.Parent.BodyGyro.cframe = script.Parent.BodyGyro.cframe * CFrame.fromEulerAnglesXYZ(0,.01,0) script.Parent.Parent.Driving.Value = true script.Parent.Parent.Left.Value = true script.Parent.Parent.Right.Value = false end end |
|
|
| Report Abuse |
|