I'm not sure whats causing the issue if it's the script or not or what it is but basically when the player buys a boat after it spawns when they stand ontop of it or try to drive it, basically spins around and rotates all crazy in the water..

gif of what happens

Pic 1 of Body objects

Pic 2 of Body objects

Pic 3 of Body objects

the localscript version of control is disabled btw

here is the serverscript version of control

--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
--[[
function Shark()
	local c0 = CFrame.new(300, -174.199997, 97, -1, -0, -0, 0, 1, 0, -0, -0, -1)
	local Finc1 = CFrame.new(297, -108, -167.899704, -1, 0, 0, 0, 0, 1, 0, 1, 0)
	local Fin2c1 = CFrame.new(-305, 86, -167.899887, 1, 0, 0, 0, 0, -1, 0, 1, 0)
	local Sharkc1 = CFrame.new(-96.5, -187.699997, 299, 0, 0, 1, 0, 1, 0, -1, -0, -0)
	local part1 = Instance.new("Part")
	part1.formFactor = 2
	part1.Size = Vector3.new(1,0.4,1)
	part1.Anchored = true
	part1.CanCollide = false
	part1.Transparency = 1
	part1.CFrame = script.Parent.Engine.CFrame + Vector3.new(0,-8,0)
	part1.Parent = script.Parent
	local p1 = part1:clone()
	p1.Anchored = false
	p1.Transparency = 0
	p1.BrickColor = BrickColor.new("Bright bluish green")
	script.FinMesh:clone().Parent = p1
	local p2 = p1:clone()
	p1.Parent = script.Parent
	p2.Parent = script.Parent
	local w = Instance.new("Weld")
	w.C0 = c0
	w.C1 = Finc1
	w.Part0 = part1
	w.Part1 = p1
	w.Parent = w.Part0
	w = Instance.new("Weld")
	w.C0 = c0
	w.C1 = Fin2c1
	w.Part0 = part1
	w.Part1 = p2
	w.Parent = w.Part0
	script.Parent.Engine.BPos:clone().Parent = part1
	script.Parent.Engine.Gyro:clone().Parent = part1
	script.Parent.Engine.BAVe:clone().Parent = part1
	part1.BPos.maxForce = Vector3.new(1000,300,1000)
	part1.BAVe.maxTorque = Vector3.new(100,100,100)
	part1.BAVe.angularvelocity = Vector3.new(0,15,0)
	part1.Anchored = false
	wait(6)
	part1.BPos.position = part1.BPos.position + Vector3.new(0,-8,0)
	wait(0.8)
	p1.Parent = nil
	p2.Parent = nil
	part1.BPos:remove()
	part1.Gyro:remove()
	part1.BAVe:remove()
	local m = Instance.new("Motor")
	m.C0 = CFrame.new(0,0,0)
	m.Part0 = script.Parent.Engine
	m.Part1 = part1
	m.Parent = m.Part0
	local p3 = part1:clone()
	p3.Anchored = false
	p3.Transparency = 0
	script.SharkMesh:clone().Parent = p3
	p3.Parent = script.Parent
	part1.CFrame = script.Parent.Engine.CFrame * CFrame.fromEulerAnglesXYZ(0,0,math.pi/2)
	w = Instance.new("Weld")
	w.C0 = c0
	w.C1 = Sharkc1
	w.Part0 = part1
	w.Part1 = p3
	w.Parent = w.Part0
	m.CurrentAngle = -3.1
	m.MaxVelocity = 0.13
	m.DesiredAngle = 0.3
	wait(.3)
	for i = 1, 40 do
		script.Parent.Engine.BPos.position = script.Parent.Engine.BPos.position + Vector3.new(0,-1,0)
		wait(.1)
	end
	local p = game.Players:findFirstChild(script.Parent.OwnerValue.Value)
	if p ~= nil then
		local b = game:GetService("BadgeService")
		--b:AwardBadge(p.userId, 15873901)
	end
	script.Parent:remove()
end
]]--
weld(script.Parent.Engine, script.Parent.VehicleSeat)
script.Parent.Engine.Anchored = false

while true do
	wait()
--	if script.Parent.Engine.Position.x < 337 and script.Parent.Engine.Position.x > 252 and script.Parent.Engine.Position.z < -270 and script.Parent.Engine.Position.z > -347  then
		--Shark()
--	end
	if script.Parent.VehicleSeat.Throttle == 1 then
		script.Parent.Engine.BPos.position = Vector3.new(script.Parent.Mast.Position.x,script.Parent.Engine.BPos.position.y,script.Parent.Mast.Position.z)
	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

what do I do to prevent this from happening?

3 comments

0

You could try adding a BodyGyro?

0

@LightningRoMan can you explain what a bodygyro will do?

0

@LightningRoman nvm it worked can you please make an answer so I can credit you