So with my boat I'm making I don't want it to be able to go up on land and I don't know how to make it not go up on land
Here's my control script
--script.Parent:BreakJoints()
wait()
function weld(a, b)
local w = Instance.new("Weld")
w.Part0 = a
w.Part1 = b
w.C0 = w.Part0.CFrame:inverse() * CFrame.new(w.Part0.Position)
w.C1 = w.Part1.CFrame:inverse() * CFrame.new(w.Part0.Position)
w.Parent = w.Part0
b.Anchored = false
end
local t = script.Parent:getChildren()
for i = 1, #t do
if (t[i].className == "Part" and t[i].Name ~= "Engine") or t[i].className == "Seat" then
weld(script.Parent.Engine, t[i])
elseif t[i].className == "Model" and t[i]:findFirstChild("Head") ~= nil then
weld(script.Parent.Engine, t[i].Head)
end
end
weld(script.Parent.Engine, script.Parent.VehicleSeat)
script.Parent.Engine.Anchored = false
while true do
wait()
if script.Parent.VehicleSeat.Throttle == 1 then
script.Parent.Engine.BPos.position = script.Parent.Engine.BPos.position + (script.Parent.VehicleSeat.CFrame.lookVector * script.Parent.VehicleSeat.MaxSpeed)
elseif script.Parent.VehicleSeat.Throttle == -1 then
script.Parent.Engine.BPos.position = Vector3.new(script.Parent.Rev.Position.x,script.Parent.Engine.BPos.position.y,script.Parent.Rev.Position.z)
end
script.Parent.Engine.BAVe.angularvelocity = Vector3.new(0,script.Parent.VehicleSeat.Steer*-10,0)
end
engine part Vehicle Seat BodyAngularVelocity BodyPosition BodyVelocity BodyGyro
