Wierd glitch- can someone help me?

Hello!
I’m currently making a ship, but there is a glitch/bug that I can’t figure out. Here is a video clip.

As you can see I’m holding the speeder down and the boat travels with its right speed. But then another player is standing on the boat it ain’t moving D:

Any suggestions?

2 Likes

Uh… any code you can show us?

My best guess is you’re moving the ship locally and so it isn’t replicated to other players but it’s pretty hard to know without code or anything provided :smiley:

Sure

Seat script:

seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		local human = child.part1.Parent:FindFirstChild("Humanoid")
		if human ~= nil then
			anim = human:LoadAnimation(seat.sitanim)
			anim:Play()
		end
	 end
end

function removed(child2)
	if anim ~= nil then
		anim:Stop()
		anim:Remove()
	end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)

Horn control script:

if script.Parent.Parent:IsA("VehicleSeat") then
	script.Parent.Parent.ChildAdded:connect(function(child)
		if child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
			local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent)
			local g=script.G:Clone()
			g.Parent=p.PlayerGui
			g:WaitForChild("src")
			g.src.Value=script.Parent
			g.Horn.Disabled=false		
		end
	end)
end

Tuning for boat script:

local Tune = {}

–[[Misc]]
Tune.LoadDelay = .1 – Delay before initializing chassis (in seconds)
Tune.AutoStart = true – Set to false if using manual ignition plugin
Tune.AutoFlip = true – Set to false if using manual flip plugin

–[[Wheel Alignment]]
–[Don’t physically apply alignment to wheels]
–[Values are in degrees]
Tune.FCamber = -0.2
Tune.RCamber = 0
Tune.FToe = 0
Tune.RToe = 0

–[[Weight and CG]]
Tune.Weight = 6000 – Total weight (in pounds)
Tune.WeightBSize = { – Size of weight brick (dimmensions in studs ; larger = more stable)
–[[Width]] 5 ,
–[[Height]] 8 ,
–[[Length]] 17 }
Tune.WeightDist = 60 – Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
Tune.CGHeight = .8 – Center of gravity height (studs relative to median of all wheels)
Tune.WBVisible = false – Makes the weight brick visible

--Unsprung Weight
Tune.FWheelDensity	= .1		-- Front Wheel Density
Tune.RWheelDensity	= .1		-- Rear Wheel Density
Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]

Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
Tune.AxleDensity	= .1		-- Density of structural members

–[[Susupension]]
Tune.SusEnabled = true – works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

--Front Suspension
Tune.FSusDamping	= 300		-- Spring Dampening
Tune.FSusStiffness	= 8000		-- Spring Force
Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

Tune.FSusLength		= 2.2			-- Suspension length (in studs)
Tune.FPreCompress	= .95		-- Pre-compression adds resting length force
Tune.FExtensionLim	= 1.1		-- Max Extension Travel (in studs)
Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
Tune.FSusAngle		= 90		-- Suspension Angle (degrees from horizontal)
	
Tune.FWsBoneLen		= 5			-- Wishbone Length
Tune.FWsBoneAngle	= 0.5		-- Wishbone angle (degrees from horizontal)
Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
 --[[Lateral]]		-.4		,	-- positive = outward
 --[[Vertical]]		-0.3		,	-- positive = upward
 --[[Forward]]		0		}	-- positive = forward

--Rear Suspension
Tune.RSusDamping	= 300		-- Spring Dampening
Tune.RSusStiffness	= 8000		-- Spring Force
Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

Tune.RSusLength		= 2.2		-- Suspension length (in studs)
Tune.RPreCompress	= .7		-- Pre-compression adds resting length force
Tune.RExtensionLim	= 1.1		-- Max Extension Travel (in studs)
Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
Tune.RSusAngle		= 90		-- Suspension Angle (degrees from horizontal)
	
Tune.RWsBoneLen		= 5			-- Wishbone Length
Tune.RWsBoneAngle	= 0.5			-- Wishbone angle (degrees from horizontal)
Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
 --[[Lateral]]		-.4		,	-- positive = outward
 --[[Vertical]]		-0.3		,	-- positive = upward
 --[[Forward]]		0		}	-- positive = forward

--Aesthetics	
Tune.SusVisible		= true			-- Spring Visible
Tune.WsBVisible		= false			-- Wishbone Visible
Tune.SusRadius		= .2			-- Suspension Coil Radius
Tune.SusThickness	= .0			-- Suspension Coil Thickness
Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
Tune.SusCoilCount	= 6				-- Suspension Coil Count
Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
Tune.WsThickness	= .1			-- Wishbone Rod Thickness

–[[Wheel Stabilizer Gyro]]
Tune.FGyroDamp = 100 – Front Wheel Non-Axial Dampening
Tune.RGyroDamp = 100 – Rear Wheel Non-Axial Dampening

–[[Steering]]
Tune.SteerInner = 36 – Inner wheel steering angle (in degrees)
Tune.SteerOuter = 37 – Outer wheel steering angle (in degrees)
Tune.SteerSpeed = .05 – Steering increment per tick (in degrees)
Tune.ReturnSpeed = .1 – Steering increment per tick (in degrees)
Tune.SteerDecay = 320 – Speed of gradient cutoff (in SPS)
Tune.MinSteer = 10 – Minimum steering at max steer decay (in percent)
Tune.MSteerExp = 1 – Mouse steering exponential degree

--Steer Gyro Tuning
Tune.SteerD			= 1000		-- Steering Dampening
Tune.SteerMaxTorque	= 50000		-- Steering Force
Tune.SteerP			= 90000	-- Steering Aggressiveness

–[[Engine]]
–Torque Curve
Tune.Horsepower = 411 – [TORQUE CURVE VISUAL]
Tune.IdleRPM = 700 – AC6.4 temp | Desmos
Tune.PeakRPM = 6000 – Use sliders to manipulate values
Tune.Redline = 8000 – Copy and paste slider values into the respective tune values
Tune.EqPoint = 4500
Tune.PeakSharpness = 2.8
Tune.CurveMult = 0.2

--Incline Compensation
Tune.InclineComp	= 2			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)

--Misc
Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
Tune.RevDecay		= 100		-- RPM decay when clutch is off
Tune.RevBounce		= 500		-- RPM kickback from redline
Tune.IdleThrottle	= .01		-- Percent throttle at idle
Tune.ClutchTol		= 300		-- Clutch engagement threshold (higher = faster response)

–[[Drivetrain]]
Tune.Config = “AWD” --“FWD” , “RWD” , “AWD”

--Differential Settings	
Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
Tune.FDiffLockThres	= 50	-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
Tune.RDiffSlipThres	= 50		-- 1 - 100%
Tune.RDiffLockThres	= 50		-- 0 - 100%
Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]

--Traction Control Settings
Tune.TCSEnabled		= true		-- Implements TCS
Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)

–[[Transmission]]
Tune.TransModes = {“Auto”,“Semi”} --[[
[Modes]
“Auto” : Automatic shifting
“Semi” : Clutchless manual shifting, dual clutch transmission
“Manual” : Manual shifting with clutch

	>Include within brackets
		eg: {"Semi"} or {"Auto", "Manual"}								
	>First mode is default mode													]]

--Automatic Settings
Tune.AutoShiftMode	= "RPM"												--[[
[Modes]
	"Speed"		: Shifts based on wheel speed
	"RPM"		: Shifts based on RPM											]]	
Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)

 --Gear Ratios
Tune.FinalDrive		= 1.6		 --	[TRANSMISSION CALCULATIONS FOR NERDS]
Tune.Ratios			= {			 --		SPEED [SPS]	 = (Wheel diameter(studs) * pi(3.14) * RPM) / (60 * Gear Ratio * Final Drive * Multiplier)
	--[[Reverse]]	3.40		,--		WHEEL TORQUE = Engine Torque * Gear Ratio * Final Drive * Multiplier
	--[[Neutral]]	0			,
	--[[ 1 ]]		3.77      	,
	--[[ 2 ]]		2.34		,
	--[[ 3 ]]		1.52		,
	--[[ 4 ]]		1.14		,
	--[[ 5 ]]		0.86		,
	--[[ 6 ]]		0.69   	,
}
Tune.FDMult			= 5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)

–[[Brakes]]
Tune.ABSEnabled = true – Implements ABS
Tune.ABSThreshold = 20 – Slip speed allowed before ABS starts working (in SPS)

Tune.FBrakeForce	= 1900		-- Front brake force
Tune.RBrakeForce	= 2200		-- Rear brake force
Tune.PBrakeForce	= 5000		-- Handbrake force

Tune.FLgcyBForce	= 15000		-- Front brake force [PGS OFF]
Tune.RLgcyBForce	= 10000		-- Rear brake force [PGS OFF]
Tune.LgcyPBForce	= 25000		-- Handbrake force [PGS OFF]

–[[[Default Controls]]
–Peripheral Deadzones
Tune.Peripherals = {
MSteerWidth = 67 , – Mouse steering control width (0 - 100% of screen width)
MSteerDZone = 10 , – Mouse steering deadzone (0 - 100%)

	ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
	ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
}

--Control Mapping
Tune.Controls = {
	
--Keyboard Controls
	--Mode Toggles
	ToggleTCS				= Enum.KeyCode.T					,
	ToggleABS				= Enum.KeyCode.Y					,
	ToggleTransMode			= Enum.KeyCode.M					,
	ToggleMouseDrive		= Enum.KeyCode.R					,
	
	--Primary Controls
	Throttle				= Enum.KeyCode.Up					,
	Brake					= Enum.KeyCode.Down					,
	SteerLeft				= Enum.KeyCode.Left					,
	SteerRight				= Enum.KeyCode.Right				,
	
	--Secondary Controls
	Throttle2				= Enum.KeyCode.W					,
	Brake2					= Enum.KeyCode.S					,
	SteerLeft2				= Enum.KeyCode.A					,
	SteerRight2				= Enum.KeyCode.D					,
	
	--Manual Transmission
	ShiftUp					= Enum.KeyCode.E					,
	ShiftDown				= Enum.KeyCode.Q					,
	Clutch					= Enum.KeyCode.LeftShift			,
	
	--Handbrake
	PBrake					= Enum.KeyCode.P					,
	
--Mouse Controls
	MouseThrottle			= Enum.UserInputType.MouseButton1	,
	MouseBrake				= Enum.UserInputType.MouseButton2	,
	MouseClutch				= Enum.KeyCode.W					,
	MouseShiftUp			= Enum.KeyCode.E					,
	MouseShiftDown			= Enum.KeyCode.Q					,
	MousePBrake				= Enum.KeyCode.LeftShift			,
	
--Controller Mapping
	ContlrThrottle			= Enum.KeyCode.ButtonR2				,
	ContlrBrake				= Enum.KeyCode.ButtonL2				,
	ContlrSteer				= Enum.KeyCode.Thumbstick1			,
	ContlrShiftUp			= Enum.KeyCode.ButtonY				,
	ContlrShiftDown			= Enum.KeyCode.ButtonX				,
	ContlrClutch			= Enum.KeyCode.ButtonR1				,
	ContlrPBrake			= Enum.KeyCode.ButtonL1				,
	ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
	ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
	ContlrToggleABS			= Enum.KeyCode.DPadRight			,
}

–[[Weight Scaling]]
–[Cubic stud : pounds ratio]
–[STANDARDIZED: Don’t touch unless needed]
Tune.WeightScaling = 1/50 --Default = 1/50 (1 cubic stud = 50 lbs)
Tune.LegacyScaling = 1/10 --Default = 1/10 (1 cubic stud = 10 lbs) [PGS OFF]

return Tune

Initialize script:

> --[[START]]
> 
> 	_BuildVersion = require(script.Parent.README)
> 
> --[[Weld functions]]
> 
> 	local JS = game:GetService("JointsService")
> 	local PGS_ON = workspace:PGSIsEnabled()
> 	
> 	function MakeWeld(x,y,type,s) 
> 		if type==nil then type="Weld" end
> 		local W=Instance.new(type,JS) 
> 		W.Part0=x W.Part1=y 
> 		W.C0=x.CFrame:inverse()*x.CFrame 
> 		W.C1=y.CFrame:inverse()*x.CFrame 
> 		if type=="Motor" and s~=nil then 
> 			W.MaxVelocity=s 
> 		end 
> 		return W	
> 	end
> 	
> 	function ModelWeld(a,b) 
> 		if a:IsA("BasePart") then 
> 			MakeWeld(b,a,"Weld") 
> 		elseif a:IsA("Model") then 
> 			for i,v in pairs(a:GetChildren()) do 
> 				ModelWeld(v,b) 
> 			end 
> 		end 
> 	end
> 	
> 	function UnAnchor(a) 
> 		if a:IsA("BasePart") then a.Anchored=false  end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end 
> 	end
> 
> 
> 	
> --[[Initialize]]
> 
> 	script.Parent:WaitForChild("A-Chassis Interface")
> 	script.Parent:WaitForChild("Plugins")
> 	script.Parent:WaitForChild("README")
> 	
> 	local car=script.Parent.Parent
> 	local _Tune=require(script.Parent)
> 	
> 	wait(_Tune.LoadDelay)
> 	
> 	--Weight Scaling
> 	local weightScaling = _Tune.WeightScaling
> 	if not workspace:PGSIsEnabled() then
> 		weightScaling = _Tune.LegacyScaling
> 	end
> 
> 	local Drive=car.Wheels:GetChildren()
> 	
> 	--Remove Existing Mass
> 	function DReduce(p)
> 		for i,v in pairs(p:GetChildren())do
> 			if v:IsA("BasePart") then
> 				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
> 				v.CustomPhysicalProperties = PhysicalProperties.new(
> 					0,
> 					v.CustomPhysicalProperties.Friction,
> 					v.CustomPhysicalProperties.Elasticity,
> 					v.CustomPhysicalProperties.FrictionWeight,
> 					v.CustomPhysicalProperties.ElasticityWeight
> 				)
> 			end
> 			DReduce(v)
> 		end
> 	end
> 	DReduce(car)
> 
> 
> 
> --[[Wheel Configuration]]	
> 	
> 	--Store Reference Orientation Function
> 	function getParts(model,t,a)
> 		for i,v in pairs(model:GetChildren()) do
> 			if v:IsA("BasePart") then table.insert(t,{v,a.CFrame:toObjectSpace(v.CFrame)})
> 			elseif v:IsA("Model") then getParts(v,t,a)
> 			end
> 		end
> 	end
> 	
> 	--PGS/Legacy
> 	local fDensity = _Tune.FWheelDensity
> 	local rDensity = _Tune.RWheelDensity
> 	if not PGS_ON then
> 		fDensity = _Tune.FWLgcyDensity
> 		rDensity = _Tune.RWLgcyDensity
> 	end
> 	
> 	local fDistX=_Tune.FWsBoneLen*math.cos(math.rad(_Tune.FWsBoneAngle))
> 	local fDistY=_Tune.FWsBoneLen*math.sin(math.rad(_Tune.FWsBoneAngle))
> 	local rDistX=_Tune.RWsBoneLen*math.cos(math.rad(_Tune.RWsBoneAngle))
> 	local rDistY=_Tune.RWsBoneLen*math.sin(math.rad(_Tune.RWsBoneAngle))
> 	
> 	local fSLX=_Tune.FSusLength*math.cos(math.rad(_Tune.FSusAngle))
> 	local fSLY=_Tune.FSusLength*math.sin(math.rad(_Tune.FSusAngle))
> 	local rSLX=_Tune.RSusLength*math.cos(math.rad(_Tune.RSusAngle))
> 	local rSLY=_Tune.RSusLength*math.sin(math.rad(_Tune.RSusAngle))
> 	
> 	for _,v in pairs(Drive) do
> 		--Apply Wheel Density
> 		if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
> 			if v:IsA("BasePart") then
> 				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
> 				v.CustomPhysicalProperties = PhysicalProperties.new(
> 					fDensity,
> 					v.CustomPhysicalProperties.Friction,
> 					v.CustomPhysicalProperties.Elasticity,
> 					v.CustomPhysicalProperties.FrictionWeight,
> 					v.CustomPhysicalProperties.ElasticityWeight
> 				)
> 			end
> 		else
> 			if v:IsA("BasePart") then
> 				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
> 				v.CustomPhysicalProperties = PhysicalProperties.new(
> 					rDensity,
> 					v.CustomPhysicalProperties.Friction,
> 					v.CustomPhysicalProperties.Elasticity,
> 					v.CustomPhysicalProperties.FrictionWeight,
> 					v.CustomPhysicalProperties.ElasticityWeight
> 				)
> 			end		
> 		end
> 		
> 		--Resurface Wheels
> 		for _,a in pairs({"Top","Bottom","Left","Right","Front","Back"}) do
> 			v[a.."Surface"]=Enum.SurfaceType.SmoothNoOutlines
> 		end
> 		
> 		--Store Axle-Anchored/Suspension-Anchored Part Orientation
> 		local WParts = {}
> 		
> 		local tPos = v.Position-car.DriveSeat.Position
> 		if v.Name=="FL" or v.Name=="RL" then
> 			v.CFrame = car.DriveSeat.CFrame*CFrame.Angles(math.rad(90),0,math.rad(90))
> 		else
> 			v.CFrame = car.DriveSeat.CFrame*CFrame.Angles(math.rad(90),0,math.rad(-90))
> 		end
> 		v.CFrame = v.CFrame+tPos
> 		
> 		if v:FindFirstChild("Parts")~=nil then
> 			getParts(v.Parts,WParts,v)
> 		end
> 		if v:FindFirstChild("Fixed")~=nil then
> 			getParts(v.Fixed,WParts,v)
> 		end
> 		
> 		--Align Wheels
> 		if v.Name=="FL" or v.Name=="FR" then
> 			v.CFrame = v.CFrame*CFrame.Angles(math.rad(_Tune.FCamber),0,0)
> 			if v.Name=="FL" then
> 				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(_Tune.FToe))
> 			else
> 				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(-_Tune.FToe))
> 			end
> 		elseif v.Name=="RL" or v.Name=="RR" then
> 			v.CFrame = v.CFrame*CFrame.Angles(math.rad(_Tune.RCamber),0,0)
> 			if v.Name=="RL" then
> 				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(_Tune.RToe))
> 			else
> 				v.CFrame = v.CFrame*CFrame.Angles(0,0,math.rad(-_Tune.RToe))
> 			end
> 		end
> 		
> 		--Re-orient Axle-Anchored/Suspension-Anchored Parts
> 		for _,a in pairs(WParts) do
> 			a[1].CFrame=v.CFrame:toWorldSpace(a[2])
> 		end
> 
> 
> 
> --[[Chassis Assembly]]
> 		--Create Steering Axle
> 		local arm=Instance.new("Part",v)
> 		arm.Name="Arm"
> 		arm.Anchored=true
> 		arm.CanCollide=false
> 		arm.FormFactor=Enum.FormFactor.Custom
> 		arm.Size=Vector3.new(_Tune.AxleSize,_Tune.AxleSize,_Tune.AxleSize)
> 		arm.CFrame=(v.CFrame*CFrame.new(0,_Tune.StAxisOffset,0))*CFrame.Angles(-math.pi/2,-math.pi/2,0)
> 		arm.CustomPhysicalProperties = PhysicalProperties.new(_Tune.AxleDensity,0,0,100,100)
> 		arm.TopSurface=Enum.SurfaceType.Smooth
> 		arm.BottomSurface=Enum.SurfaceType.Smooth
> 		arm.Transparency=1
> 			
> 		--Create Wheel Spindle
> 		local base=arm:Clone()
> 		base.Parent=v
> 		base.Name="Base"
> 		base.CFrame=base.CFrame*CFrame.new(0,_Tune.AxleSize,0)
> 		base.BottomSurface=Enum.SurfaceType.Hinge
> 		
> 		--Create Steering Anchor
> 		local axle=arm:Clone()
> 		axle.Parent=v
> 		axle.Name="Axle"
> 		axle.CFrame=CFrame.new(v.Position-((v.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*((v.Size.x/2)+(axle.Size.x/2))),v.Position)*CFrame.Angles(0,math.pi,0)
> 		axle.BackSurface=Enum.SurfaceType.Hinge
> 		
> 		if v.Name=="F" or v.Name=="R" then
> 			local axle2=arm:Clone()
> 			axle2.Parent=v
> 			axle2.Name="Axle"
> 			axle2.CFrame=CFrame.new(v.Position+((v.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector*((v.Size.x/2)+(axle2.Size.x/2))),v.Position)*CFrame.Angles(0,math.pi,0)
> 			axle2.BackSurface=Enum.SurfaceType.Hinge
> 			MakeWeld(arm,axle2)
> 		end
> 		
> 		--Create Suspension
> 		if PGS_ON and _Tune.SusEnabled then			
> 			local sa=arm:Clone()
> 			sa.Parent=v
> 			sa.Name="#SA"
> 			if v.Name == "FL" or v.Name=="FR" or v.Name =="F" then
> 				local aOff = _Tune.FAnchorOffset
> 				sa.CFrame=v.CFrame*CFrame.new(_Tune.AxleSize/2,-fDistX,-fDistY)*CFrame.new(aOff[3],aOff[1],-aOff[2])*CFrame.Angles(-math.pi/2,-math.pi/2,0)
> 			else
> 				local aOff = _Tune.RAnchorOffset
> 				sa.CFrame=v.CFrame*CFrame.new(_Tune.AxleSize/2,-rDistX,-rDistY)*CFrame.new(aOff[3],aOff[1],-aOff[2])*CFrame.Angles(-math.pi/2,-math.pi/2,0)
> 			end
> 			
> 			local sb=sa:Clone()
> 			sb.Parent=v
> 			sb.Name="#SB"
> 			sb.CFrame=sa.CFrame*CFrame.new(0,0,_Tune.AxleSize)
> 			
> 			sb.FrontSurface=Enum.SurfaceType.Hinge	
> 			
> 			local g = Instance.new("BodyGyro",sb)
> 			g.Name = "Stabilizer"
> 			g.MaxTorque = Vector3.new(0,0,1)
> 			g.P = 0
> 			
> 			local sf1 = Instance.new("Attachment",sa)
> 			sf1.Name = "SAtt"
> 			
> 			local sf2 = sf1:Clone()
> 			sf2.Parent = sb
> 			
> 			
> 			if v.Name == "FL" or v.Name == "FR" or v.Name == "F" then
> 				sf1.Position = Vector3.new(fDistX-fSLX,-fDistY+fSLY,_Tune.AxleSize/2)
> 				sf2.Position = Vector3.new(fDistX,-fDistY,-_Tune.AxleSize/2)
> 			elseif v.Name == "RL" or v.Name=="RR" or v.Name == "R" then
> 				sf1.Position = Vector3.new(rDistX-rSLX,-rDistY+rSLY,_Tune.AxleSize/2)
> 				sf2.Position = Vector3.new(rDistX,-rDistY,-_Tune.AxleSize/2)
> 			end
> 			
> 			sb:MakeJoints()
> 			
> 			local sp = Instance.new("SpringConstraint",v)
> 			sp.Name = "Spring"
> 			sp.Attachment0 = sf1
> 			sp.Attachment1 = sf2
> 			sp.LimitsEnabled = true
> 			
> 			sp.Visible=_Tune.SusVisible
> 			sp.Radius=_Tune.SusRadius
> 			sp.Thickness=_Tune.SusThickness
> 			sp.Color=BrickColor.new(_Tune.SusColor)
> 			sp.Coils=_Tune.SusCoilCount
> 			
> 			if v.Name == "FL" or v.Name=="FR" or v.Name =="F" then
> 				g.D = _Tune.FAntiRoll
> 				sp.Damping = _Tune.FSusDamping
> 				sp.Stiffness = _Tune.FSusStiffness
> 				sp.FreeLength = _Tune.FSusLength+_Tune.FPreCompress
> 				sp.MaxLength = _Tune.FSusLength+_Tune.FExtensionLim
> 				sp.MinLength = _Tune.FSusLength-_Tune.FCompressLim
> 			else
> 				g.D = _Tune.RAntiRoll
> 				sp.Damping = _Tune.RSusDamping
> 				sp.Stiffness = _Tune.RSusStiffness
> 				sp.FreeLength = _Tune.RSusLength+_Tune.RPreCompress
> 				sp.MaxLength = _Tune.RSusLength+_Tune.RExtensionLim
> 				sp.MinLength = _Tune.RSusLength-_Tune.RCompressLim
> 			end
> 			
> 			MakeWeld(car.DriveSeat,sa)
> 			MakeWeld(sb,base)
> 		else
> 			MakeWeld(car.DriveSeat,base)
> 		end
> 		
> 		--Lock Rear Steering Axle
> 		if v.Name == "RL" or v.Name == "RR" or v.Name=="R" then
> 			MakeWeld(base,axle)
> 		end
> 		
> 		--Weld Assembly
> 		if v.Parent.Name == "RL" or v.Parent.Name == "RR" or v.Name=="R" then
> 			MakeWeld(car.DriveSeat,arm)
> 		end
> 		
> 		MakeWeld(arm,axle)
> 		
> 		arm:MakeJoints()
> 		axle:MakeJoints()
> 	
> 		--Weld Miscelaneous Parts
> 		if v:FindFirstChild("SuspensionFixed")~=nil then
> 			ModelWeld(v.SuspensionFixed,car.DriveSeat)
> 		end
> 		if v:FindFirstChild("WheelFixed")~=nil then
> 			ModelWeld(v.WheelFixed,axle)
> 		end
> 		if v:FindFirstChild("Fixed")~=nil then
> 			ModelWeld(v.Fixed,arm)
> 		end
> 		
> 		--Weld Wheel Parts
> 		if v:FindFirstChild("Parts")~=nil then
> 			ModelWeld(v.Parts,v)
> 		end
> 		
> 		--Add Steering Gyro
> 		if v:FindFirstChild("Steer") then
> 			v:FindFirstChild("Steer"):Destroy()
> 		end
> 		
> 		if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
> 			local steer=Instance.new("BodyGyro",arm)
> 			steer.Name="Steer"
> 			steer.P=_Tune.SteerP
> 			steer.D=_Tune.SteerD
> 			steer.MaxTorque=Vector3.new(0,_Tune.SteerMaxTorque,0)
> 			steer.cframe=v.CFrame*CFrame.Angles(0,-math.pi/2,0)
> 		end
> 		
> 		--Add Stabilization Gyro
> 		local gyro=Instance.new("BodyGyro",v)
> 		gyro.Name="Stabilizer"
> 		gyro.MaxTorque=Vector3.new(1,0,1)
> 		gyro.P=0
> 		if v.Name=="FL" or v.Name=="FR"  or v.Name=="F" then
> 			gyro.D=_Tune.FGyroDamp
> 		else
> 			gyro.D=_Tune.RGyroDamp
> 		end
> 		
> 		--Add Rotational BodyMover
> 		local AV=Instance.new("BodyAngularVelocity",v)
> 		AV.Name="#AV"
> 		AV.angularvelocity=Vector3.new(0,0,0)
> 		AV.maxTorque=Vector3.new(_Tune.PBrakeForce,0,_Tune.PBrakeForce)
> 		AV.P=1e9
> 	end
> 
> 
> 
> --[[Vehicle Weight]]	
> 	--Determine Current Mass
> 	local mass=0
> 	
> 	function getMass(p)
> 		for i,v in pairs(p:GetChildren())do
> 			if v:IsA("BasePart") then
> 				mass=mass+v:GetMass()
> 			end
> 			getMass(v)
> 		end	
> 	end
> 	getMass(car)
> 	
> 	--Apply Vehicle Weight
> 	if mass<_Tune.Weight*weightScaling then
> 		--Calculate Weight Distribution
> 		local centerF = Vector3.new()
> 		local centerR = Vector3.new()
> 		local countF = 0
> 		local countR = 0
> 		
> 		for i,v in pairs(Drive) do
> 			if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
> 				centerF = centerF+v.CFrame.p
> 				countF = countF+1
> 			else
> 				centerR = centerR+v.CFrame.p
> 				countR = countR+1
> 			end
> 		end
> 		centerF = centerF/countF
> 		centerR = centerR/countR
> 		local center = centerR:Lerp(centerF, _Tune.WeightDist/100)  
> 		
> 		--Create Weight Brick
> 		local weightB = Instance.new("Part",car.Body)
> 		weightB.Name = "#Weight"
> 		weightB.Anchored = true
> 		weightB.CanCollide = false
> 		weightB.BrickColor = BrickColor.new("Really black")
> 		weightB.TopSurface = Enum.SurfaceType.Smooth
> 		weightB.BottomSurface = Enum.SurfaceType.Smooth
> 		if _Tune.WBVisible then
> 			weightB.Transparency = .75			
> 		else
> 			weightB.Transparency = 1			
> 		end
> 		weightB.Size = Vector3.new(_Tune.WeightBSize[1],_Tune.WeightBSize[2],_Tune.WeightBSize[3])
> 		weightB.CustomPhysicalProperties = PhysicalProperties.new(((_Tune.Weight*weightScaling)-mass)/(weightB.Size.x*weightB.Size.y*weightB.Size.z),0,0,0,0)
> 		weightB.CFrame=(car.DriveSeat.CFrame-car.DriveSeat.Position+center)*CFrame.new(0,_Tune.CGHeight,0)
> 	else
> 		--Existing Weight Is Too Massive
> 		warn( "\n\t [AC".._BuildVersion.."]: Mass too high for specified weight."
> 			.."\n\t    Target Mass:\t"..(math.ceil(_Tune.Weight*weightScaling*100)/100)
> 			.."\n\t    Current Mass:\t"..(math.ceil(mass*100)/100)
> 			.."\n\t Reduce part size or axle density to achieve desired weight.")
> 	end
> 	
> 	local flipG = Instance.new("BodyGyro",car.DriveSeat)
> 	flipG.Name = "Flip"
> 	flipG.D = 0
> 	flipG.MaxTorque = Vector3.new(0,0,0)
> 	flipG.P = 0
> 
> 
> 	
> --[[Finalize Chassis]]	
> 	--Misc Weld
> 	wait()
> 	for i,v in pairs(script:GetChildren()) do
> 		if v:IsA("ModuleScript") then
> 			require(v)
> 		end
> 	end
> 	
> 	--Weld Body
> 	wait()
> 	ModelWeld(car.Body,car.DriveSeat)
> 	
> 	--Unanchor
> 	wait()	
> 	UnAnchor(car)
> 
> --[[Manage Plugins]]
> 	
> 	script.Parent["A-Chassis Interface"].Car.Value=car
> 	for i,v in pairs(script.Parent.Plugins:GetChildren()) do
> 		for _,a in pairs(v:GetChildren()) do
> 			if a:IsA("RemoteEvent") or a:IsA("RemoteFunction") then 
> 				a.Parent=car
> 				for _,b in pairs(a:GetChildren()) do
> 					if b:IsA("Script") then b.Disabled=false end
> 				end	
> 			end
> 		end
> 		v.Parent = script.Parent["A-Chassis Interface"]
> 	end
> 	script.Parent.Plugins:Destroy()
> 
> 
> 
> --[[Remove Character Weight]]
> 	--Get Seats
> 	local Seats = {}
> 	function getSeats(p)
> 		for i,v in pairs(p:GetChildren()) do
> 			if v:IsA("VehicleSeat") or v:IsA("Seat") then
> 				local seat = {}
> 				seat.Seat = v
> 				seat.Parts = {}
> 				table.insert(Seats,seat)
> 			end
> 			getSeats(v)
> 		end	
> 	end
> 	getSeats(car)
> 	
> 	--Store Physical Properties/Remove Mass Function
> 	function getPProperties(mod,t)
> 		for i,v in pairs(mod:GetChildren()) do
> 			if v:IsA("BasePart") then
> 				if v.CustomPhysicalProperties == nil then v.CustomPhysicalProperties = PhysicalProperties.new(v.Material) end
> 				table.insert(t,{v,v.CustomPhysicalProperties})
> 				v.CustomPhysicalProperties = PhysicalProperties.new(
> 					0,
> 					v.CustomPhysicalProperties.Friction,
> 					v.CustomPhysicalProperties.Elasticity,
> 					v.CustomPhysicalProperties.FrictionWeight,
> 					v.CustomPhysicalProperties.ElasticityWeight
> 				)
> 			end
> 			getPProperties(v,t)
> 		end			
> 	end
> 	
> 	--Apply Seat Handler
> 	for i,v in pairs(Seats) do
> 		--Sit Handler
> 		v.Seat.ChildAdded:connect(function(child)
> 			if child.Name=="SeatWeld" and child:IsA("Weld") and child.Part1~=nil and child.Part1.Parent ~= workspace and not child.Part1.Parent:IsDescendantOf(car) then
> 				v.Parts = {}
> 				getPProperties(child.Part1.Parent,v.Parts)
> 			end
> 		end)
> 		
> 		--Leave Handler
> 		v.Seat.ChildRemoved:connect(function(child)
> 			if child.Name=="SeatWeld" and child:IsA("Weld") then
> 				for i,v in pairs(v.Parts) do
> 					if v[1]~=nil and v[2]~=nil and v[1]:IsDescendantOf(workspace) then
> 						v[1].CustomPhysicalProperties = v[2]
> 					end
> 				end
> 				v.Parts = {}
> 			end
> 		end)
> 	end
> 
> 
> 
> --[[Driver Handling]]
> 
> 	--Driver Sit	
> 	car.DriveSeat.ChildAdded:connect(function(child)
> 		if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
> 			--Distribute Client Interface
> 			local p=game.Players:GetPlayerFromCharacter(child.Part1.Parent)
> 			car.DriveSeat:SetNetworkOwner(p)
> 			local g=script.Parent["A-Chassis Interface"]:Clone()
> 			g.Parent=p.PlayerGui
> 		end
> 	end)
> 	
> 	--Driver Leave
> 	car.DriveSeat.ChildRemoved:connect(function(child)
> 		if child.Name=="SeatWeld" and child:IsA("Weld") then
> 			--Remove Flip Force
> 			if car.DriveSeat:FindFirstChild("Flip")~=nil then
> 				car.DriveSeat.Flip.MaxTorque = Vector3.new()
> 			end
> 			
> 			--Remove Wheel Force
> 			for i,v in pairs(car.Wheels:GetChildren()) do
> 				if v:FindFirstChild("#AV")~=nil then
> 					if v["#AV"]:IsA("BodyAngularVelocity") then
> 						if v["#AV"].AngularVelocity.Magnitude>0 then
> 							v["#AV"].AngularVelocity = Vector3.new()
> 							v["#AV"].MaxTorque = Vector3.new()
> 						end
> 					else
> 						if v["#AV"].AngularVelocity>0 then
> 							v["#AV"].AngularVelocity = 0
> 							v["#AV"].MotorMaxTorque = 0
> 						end
> 					end
> 				end
> 			end
> 		end
> 	end)
> 	
> --[END]]

Miscweld script:

> local MiscWeld = {}
> 
> function MakeWeld(x,y,type,s) 
> 	if type==nil then type="Weld" end
> 	local W=Instance.new(type)
> 	W.Part0=x W.Part1=y 
> 	W.C0=x.CFrame:inverse()*x.CFrame 
> 	W.C1=y.CFrame:inverse()*x.CFrame 
> 	W.Parent=x 
> 	if type=="Motor" and s~=nil then 
> 		W.MaxVelocity=s 
> 	end 
> 	return W	
> end
> function ModelWeld(a,b) 
> 	if a:IsA("BasePart") then 
> 		MakeWeld(b,a,"Weld") 
> 	elseif a:IsA("Model") then 
> 		for i,v in pairs(a:GetChildren()) do 
> 			ModelWeld(v,b) 
> 		end 
> 	end 
> end
> 
> car = script.Parent.Parent.Parent
> misc = car:WaitForChild("Misc")
> 
> ---------------------------
> --[[
> 	--Main anchor point is the DriveSeat <car.DriveSeat>	
> 	
> 	Usage:
> 		MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld"  **Applies to Motor welds only
> 		ModelWeld(Model,MainPart)
> 	Example:
> 		MakeWeld(car.DriveSeat,misc.PassengerSeat)
> 		MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2)
> 		ModelWeld(car.DriveSeat,misc.Door)
> ]]
> 
> --Weld stuff here
> 
> 
> car.DriveSeat.ChildAdded:connect(function(child)
> 	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
> 		child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
> 	end
> end)
> 
> ---------------------------
> return MiscWeld

Car script:

> --[[START]]
> 
> 	script.Parent:WaitForChild("Car")
> 	script.Parent:WaitForChild("IsOn")
> 	script.Parent:WaitForChild("ControlsOpen")
> 	script.Parent:WaitForChild("Values")
> 
> --[[Dependencies]]
> 
> 	local player = game.Players.LocalPlayer
> 	local mouse = player:GetMouse()
> 	local UserInputService = game:GetService("UserInputService")
> 	local car = script.Parent.Car.Value
> 	local _Tune = require(car["A-Chassis Tune"])
> 
> 
> 
> --[[Output Scaling Factor]]
> 
> 	local hpScaling = _Tune.WeightScaling*12
> 	local FBrakeForce = _Tune.FBrakeForce
> 	local RBrakeForce = _Tune.RBrakeForce
> 	local PBrakeForce = _Tune.PBrakeForce
> 	if not workspace:PGSIsEnabled() then
> 		hpScaling = _Tune.LegacyScaling*12
> 		FBrakeForce = _Tune.FLgcyBForce
> 		RBrakeForce = _Tune.RLgcyBForce
> 		PBrakeForce = _Tune.LgcyPBForce
> 	end
> 
> --[[Status Vars]]
> 
> 	local _IsOn = _Tune.AutoStart
> 	if _Tune.AutoStart then script.Parent.IsOn.Value=true end
> 	
> 	local _GSteerT=0
> 	local _GSteerC=0
> 	local _GThrot=0
> 	local _GBrake=0
> 	
> 	local _ClutchOn = true
> 	local _ClPressing = false
> 	local _RPM = 0
> 	local _HP = 0
> 	local _OutTorque = 0
> 	local _CGear = 0
> 	local _PGear = _CGear
> 	local _spLimit = 0
> 	
> 	local _TMode = _Tune.TransModes[1]
> 	
> 	local _MSteer = false
> 	local _SteerL = false
> 	local _SteerR = false
> 	local _PBrake = false
> 	local _TCS = _Tune.TCSEnabled
> 	local _TCSActive = false
> 	local _ABS = _Tune.ABSEnabled
> 	local _ABSActive = false
> 	
> 	local FlipWait=tick()
> 	local FlipDB=false
> 	
> 	local _InControls = false
> 
> 
> 
> --[[Shutdown]]
> 
> 	car.DriveSeat.ChildRemoved:connect(function(child)
> 		if child.Name=="SeatWeld" and child:IsA("Weld") then
> 			script.Parent:Destroy()
> 		end
> 	end)
> 
> 
> 
> --[[Controls]]
> 
> 	local _CTRL = _Tune.Controls
> 	local Controls = Instance.new("Folder",script.Parent)
> 	Controls.Name = "Controls"
> 	for i,v in pairs(_CTRL) do
> 		local a=Instance.new("StringValue",Controls)
> 		a.Name=i
> 		a.Value=v.Name
> 		a.Changed:connect(function()
> 			if i=="MouseThrottle" or i=="MouseBrake" then
> 				if a.Value == "MouseButton1" or a.Value == "MouseButton2" then
> 					_CTRL[i]=Enum.UserInputType[a.Value]
> 				else
> 					_CTRL[i]=Enum.KeyCode[a.Value]
> 				end
> 			else
> 				_CTRL[i]=Enum.KeyCode[a.Value]
> 			end
> 		end)
> 	end
> 	
> 	--Deadzone Adjust
> 	local _PPH = _Tune.Peripherals
> 		for i,v in pairs(_PPH) do
> 		local a = Instance.new("IntValue",Controls)
> 		a.Name = i
> 		a.Value = v
> 		a.Changed:connect(function() 
> 			a.Value=math.min(100,math.max(0,a.Value))
> 			_PPH[i] = a.Value
> 		end)
> 	end
> 	
> 	--Input Handler
> 	function DealWithInput(input,IsRobloxFunction)
> 		if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
> 			--Shift Down [Manual Transmission]
> 			if _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftDown"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftDown"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftDown"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
> 				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
> 				_CGear = math.max(_CGear-1,-1)
> 				
> 			--Shift Up [Manual Transmission]
> 			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrShiftUp"] or (_MSteer and input.KeyCode==_CTRL["MouseShiftUp"]) or ((not _MSteer) and input.KeyCode==_CTRL["ShiftUp"])) and (_TMode=="Semi" or (_TMode=="Manual" and (not _ClutchOn))) and input.UserInputState == Enum.UserInputState.Begin then
> 				if _CGear == 0 and (_TMode=="Auto" or not _ClPressing) then _ClutchOn = true end
> 				_CGear = math.min(_CGear+1,#_Tune.Ratios-2)
> 				
> 			--Toggle Clutch
> 			elseif _IsOn and  (input.KeyCode ==_CTRL["ContlrClutch"] or (_MSteer and input.KeyCode==_CTRL["MouseClutch"]) or ((not _MSteer) and input.KeyCode==_CTRL["Clutch"])) and _TMode=="Manual" then
> 				if input.UserInputState == Enum.UserInputState.Begin then
> 					_ClutchOn = false
> 					_ClPressing = true
> 				elseif input.UserInputState == Enum.UserInputState.End then
> 					_ClutchOn = true
> 					_ClPressing = false
> 				end
> 				
> 			--Toggle PBrake
> 			elseif _IsOn and  input.KeyCode ==_CTRL["ContlrPBrake"] or (_MSteer and input.KeyCode==_CTRL["MousePBrake"]) or ((not _MSteer) and input.KeyCode==_CTRL["PBrake"]) then
> 				if input.UserInputState == Enum.UserInputState.Begin then
> 					_PBrake = not _PBrake
> 				elseif input.UserInputState == Enum.UserInputState.End then
> 					if car.DriveSeat.Velocity.Magnitude>5 then
> 						_PBrake = false
> 					end
> 				end
> 				
> 			--Toggle Transmission Mode
> 			elseif (input.KeyCode == _CTRL["ContlrToggleTMode"] or input.KeyCode==_CTRL["ToggleTransMode"]) and input.UserInputState == Enum.UserInputState.Begin then
> 				local n=1
> 				for i,v in pairs(_Tune.TransModes) do
> 					if v==_TMode then n=i break end
> 				end
> 				n=n+1
> 				if n>#_Tune.TransModes then n=1 end
> 				_TMode = _Tune.TransModes[n]
> 				
> 			--Throttle
> 			elseif _IsOn and ((not _MSteer) and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"])) or ((((_CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseThrottle"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseThrottle"]) or input.KeyCode == _CTRL["MouseThrottle"])and _MSteer) then
> 				if input.UserInputState == Enum.UserInputState.Begin then
> 					_GThrot = 1
> 				else
> 					_GThrot = _Tune.IdleThrottle/100
> 				end
> 				
> 			--Brake
> 			elseif ((not _MSteer) and (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"])) or ((((_CTRL["MouseBrake"]==Enum.UserInputType.MouseButton1 or _CTRL["MouseBrake"]==Enum.UserInputType.MouseButton2) and input.UserInputType == _CTRL["MouseBrake"]) or input.KeyCode == _CTRL["MouseBrake"])and _MSteer) then
> 				if input.UserInputState == Enum.UserInputState.Begin then
> 					_GBrake = 1
> 				else
> 					_GBrake = 0
> 				end
> 				
> 			--Steer Left
> 			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
> 				if input.UserInputState == Enum.UserInputState.Begin then
> 					_GSteerT = -1
> 					_SteerL = true
> 				else
> 					if _SteerR then
> 						_GSteerT = 1
> 					else
> 						_GSteerT = 0
> 					end
> 					_SteerL = false
> 				end
> 				
> 			--Steer Right
> 			elseif (not _MSteer) and (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
> 				if input.UserInputState == Enum.UserInputState.Begin then
> 					_GSteerT = 1
> 					_SteerR = true
> 				else
> 					if _SteerL then
> 						_GSteerT = -1
> 					else
> 						_GSteerT = 0
> 					end
> 					_SteerR = false
> 				end
> 				
> 			--Toggle Mouse Controls
> 			elseif input.KeyCode ==_CTRL["ToggleMouseDrive"] then
> 				if input.UserInputState == Enum.UserInputState.End then
> 					_MSteer = not _MSteer
> 					_GThrot = _Tune.IdleThrottle/100
> 					_GBrake = 0
> 					_GSteerT = 0
> 					_ClutchOn = true
> 				end
> 				
> 			--Toggle TCS
> 			elseif  _Tune.TCSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleTCS"] or input.KeyCode == _CTRL["ContlrToggleTCS"] then
> 				if input.UserInputState == Enum.UserInputState.End then
> 					_TCS = not _TCS
> 				end
> 			
> 			--Toggle ABS
> 			elseif  _Tune. ABSEnabled and _IsOn and input.KeyCode == _CTRL["ToggleABS"] or input.KeyCode == _CTRL["ContlrToggleABS"] then
> 				if input.UserInputState == Enum.UserInputState.End then
> 					_ABS = not _ABS
> 				end
> 			end
> 			
> 			--Variable Controls
> 			if input.UserInputType.Name:find("Gamepad") then
> 				--Gamepad Steering
> 				if input.KeyCode == _CTRL["ContlrSteer"] then
> 					if input.Position.X>= 0 then
> 						local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
> 						if math.abs(input.Position.X)>cDZone then
> 							_GSteerT = (input.Position.X-cDZone)/(1-cDZone)
> 						else
> 							_GSteerT = 0
> 						end
> 					else
> 						local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
> 						if math.abs(input.Position.X)>cDZone then
> 							_GSteerT = (input.Position.X+cDZone)/(1-cDZone)
> 						else
> 							_GSteerT = 0
> 						end
> 					end
> 					
> 				--Gamepad Throttle
> 				elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
> 					_GThrot = math.max(_Tune.IdleThrottle/100,input.Position.Z)
> 					
> 				--Gamepad Brake
> 				elseif input.KeyCode == _CTRL["ContlrBrake"] then
> 					_GBrake = input.Position.Z
> 				end
> 			end
> 		else
> 			_GThrot = _Tune.IdleThrottle/100
> 			_GSteerT = 0
> 			_GBrake = 0
> 			if _CGear~=0 then _ClutchOn = true end
> 		end
> 	end
> 	UserInputService.InputBegan:connect(DealWithInput)
> 	UserInputService.InputChanged:connect(DealWithInput)
> 	UserInputService.InputEnded:connect(DealWithInput)
> 
> 
> 
> --[[Drivetrain Initialize]]
> 
> 	local Drive={}
> 	
> 	--Power Front Wheels
> 	if _Tune.Config == "FWD" or _Tune.Config == "AWD" then
> 		for i,v in pairs(car.Wheels:GetChildren()) do
> 			if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
> 				table.insert(Drive,v)
> 			end
> 		end
> 	end
> 	
> 	--Power Rear Wheels
> 	if _Tune.Config == "RWD" or _Tune.Config == "AWD" then
> 		for i,v in pairs(car.Wheels:GetChildren()) do
> 			if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then
> 				table.insert(Drive,v)
> 			end
> 		end
> 	end
> 	
> 	--Determine Wheel Size
> 	local wDia = 0
> 	for i,v in pairs(Drive) do
> 		if v.Size.x>wDia then wDia = v.Size.x end
> 	end
> 	
> 	--Pre-Toggled PBrake
> 	for i,v in pairs(car.Wheels:GetChildren()) do
> 		if v["#AV"]:IsA("BodyAngularVelocity") then
> 			if math.abs(v["#AV"].maxTorque.Magnitude-PBrakeForce)<1 then
> 				_PBrake=true
> 			end
> 		else
> 			if math.abs(v["#AV"].MotorMaxTorque-PBrakeForce)<1 then
> 				_PBrake=true
> 			end
> 		end
> 	end
> 	
> 	
> 
> --[[Steering]]
> 
> 	function Steering()
> 		--Mouse Steer
> 		if _MSteer then
> 			local msWidth = math.max(1,mouse.ViewSizeX*_Tune.Peripherals.MSteerWidth/200)
> 			local mdZone = _Tune.Peripherals.MSteerDZone/100
> 			local mST = ((mouse.X-mouse.ViewSizeX/2)/msWidth)
> 			if math.abs(mST)<=mdZone then
> 				_GSteerT = 0
> 			else
> 				_GSteerT = (math.max(math.min((math.abs(mST)-mdZone),(1-mdZone)),0)/(1-mdZone))^_Tune.MSteerExp * (mST / math.abs(mST))
> 			end
> 		end
> 		
> 		--Interpolate Steering
> 		if _GSteerC < _GSteerT then
> 			if _GSteerC<0 then
> 				_GSteerC = math.min(_GSteerT,_GSteerC+_Tune.ReturnSpeed)
> 			else
> 				_GSteerC = math.min(_GSteerT,_GSteerC+_Tune.SteerSpeed)
> 			end
> 		else
> 			if _GSteerC>0 then
> 				_GSteerC = math.max(_GSteerT,_GSteerC-_Tune.ReturnSpeed)
> 			else
> 				_GSteerC = math.max(_GSteerT,_GSteerC-_Tune.SteerSpeed)
> 			end
> 		end
> 		
> 		--Steer Decay Multiplier
> 		local sDecay = (1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
> 		
> 		--Apply Steering
> 		for i,v in pairs(car.Wheels:GetChildren()) do
> 			if v.Name=="F" then
> 				v.Arm.Steer.CFrame=car.Wheels.F.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerInner*sDecay),0)
> 			elseif v.Name=="FL" then
> 				if _GSteerC>= 0 then
> 					v.Arm.Steer.CFrame=car.Wheels.FL.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerOuter*sDecay),0)
> 				else
> 					v.Arm.Steer.CFrame=car.Wheels.FL.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerInner*sDecay),0)
> 				end
> 			elseif v.Name=="FR" then
> 				if _GSteerC>= 0 then
> 					v.Arm.Steer.CFrame=car.Wheels.FR.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerInner*sDecay),0)
> 				else
> 					v.Arm.Steer.CFrame=car.Wheels.FR.Base.CFrame*CFrame.Angles(0,-math.rad(_GSteerC*_Tune.SteerOuter*sDecay),0)
> 				end
> 			end
> 		end
> 	end
> 
> 
> 
> --[[Engine]]
> 
> 	local fFD = _Tune.FinalDrive*_Tune.FDMult
> 	local fFDr = fFD*30/math.pi
> 	local cGrav = workspace.Gravity*_Tune.InclineComp/32.2
> 	local wDRatio = wDia*math.pi/60
> 	local cfWRot = CFrame.Angles(math.pi/2,-math.pi/2,0)
> 	local cfYRot = CFrame.Angles(0,math.pi,0)
> 	local rtTwo = (2^.5)/2
> 
> 	--Horsepower Curve
> 	local fgc_h=_Tune.Horsepower/100
> 	local fgc_n=_Tune.PeakRPM/1000
> 	local fgc_a=_Tune.PeakSharpness
> 	local fgc_c=_Tune.CurveMult
> 	
> 	function FGC(x)
> 		x=x/1000
> 		return (((-(x-fgc_n)^2)*math.min(fgc_h/(fgc_n^2),fgc_c^(fgc_n/fgc_h)))+fgc_h)*(x-((x^fgc_a)/((fgc_a*fgc_n)^(fgc_a-1))))
> 	end
> 	local PeakFGC = FGC(_Tune.PeakRPM)
> 	
> 	--Plot Current Horsepower
> 	function GetCurve(x,gear)
> 		local hp=math.max((FGC(x)*_Tune.Horsepower)/PeakFGC,0)
> 		return hp,hp*(_Tune.EqPoint/x)*_Tune.Ratios[gear+2]*fFD*hpScaling
> 	end
> 	
> 	--Output Cache
> 	local CacheTorque = true
> 	local HPCache = {}
> 	local HPInc = 100
> 	
> 	if CacheTorque then
> 		for gear,ratio in pairs(_Tune.Ratios) do
> 			local hpPlot = {}
> 			for rpm = math.floor(_Tune.IdleRPM/HPInc),math.ceil((_Tune.Redline+100)/HPInc) do
> 				local tqPlot = {}
> 				tqPlot.Horsepower,tqPlot.Torque = GetCurve(rpm*HPInc,gear-2)
> 				hp1,tq1 = GetCurve((rpm+1)*HPInc,gear-2)
> 				tqPlot.HpSlope = (hp1 - tqPlot.Horsepower)/(HPInc/1000)
> 				tqPlot.TqSlope = (tq1 - tqPlot.Torque)/(HPInc/1000)
> 				hpPlot[rpm] = tqPlot
> 			end
> 			table.insert(HPCache,hpPlot)
> 		end
> 	end
> 	
> 	--Powertrain
> 	
> 	--Update RPM
> 	function RPM()
> 		--Neutral Gear
> 		if _CGear==0 then _ClutchOn = false end
> 	
> 		--Car Is Off
> 		local revMin = _Tune.IdleRPM
> 		if not _IsOn then 
> 			revMin = 0 
> 			_CGear = 0
> 			_ClutchOn = false
> 			_GThrot = _Tune.IdleThrottle/100
> 		end
> 		
> 		--Determine RPM
> 		local maxSpin=0
> 		for i,v in pairs(Drive) do
> 			if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
> 		end
> 		if _ClutchOn then
> 			local aRPM = math.max(math.min(maxSpin*_Tune.Ratios[_CGear+2]*fFDr,_Tune.Redline+100),revMin)
> 			local clutchP = math.min(math.abs(aRPM-_RPM)/_Tune.ClutchTol,.9)
> 			_RPM = _RPM*clutchP  +  aRPM*(1-clutchP)
> 		else
> 			if _GThrot-(_Tune.IdleThrottle/100)>0 then
> 				if _RPM>_Tune.Redline then
> 					_RPM = _RPM-_Tune.RevBounce*2
> 				else
> 					_RPM = math.min(_RPM+_Tune.RevAccel*_GThrot,_Tune.Redline+100)
> 				end
> 			else
> 				_RPM = math.max(_RPM-_Tune.RevDecay,revMin)
> 			end
> 		end
> 		
> 		--Rev Limiter
> 		_spLimit = (_Tune.Redline+100)/(fFDr*_Tune.Ratios[_CGear+2])
> 		if _RPM>_Tune.Redline then 
> 			if _CGear<#_Tune.Ratios-2 then
> 				_RPM = _RPM-_Tune.RevBounce
> 			else
> 				_RPM = _RPM-_Tune.RevBounce*.5
> 			end
> 		end
> 	end
> 	
> 	--Apply Power
> 	function Engine()
> 		--Get Torque
> 		local maxSpin=0
> 		for i,v in pairs(Drive) do
> 			if v.RotVelocity.Magnitude>maxSpin then maxSpin = v.RotVelocity.Magnitude end
> 		end
> 		if _ClutchOn then
> 			if CacheTorque then
> 				local cTq = HPCache[_CGear+2][math.floor(math.min(_Tune.Redline,math.max(_Tune.IdleRPM,_RPM))/HPInc)]
> 				_HP = cTq.Horsepower+(cTq.HpSlope*(_RPM-math.floor(_RPM/HPInc))/1000)
> 				_OutTorque = cTq.Torque+(cTq.TqSlope*(_RPM-math.floor(_RPM/HPInc))/1000)
> 			else
> 				_HP,_OutTorque = GetCurve(_RPM,_CGear)
> 				
> 			end
> 			local iComp =(car.DriveSeat.CFrame.lookVector.y)*cGrav
> 			if _CGear==-1 then iComp=-iComp end
> 			_OutTorque = _OutTorque*math.max(1,(1+iComp))
> 		else
> 			_HP,_OutTorque = 0,0
> 		end
> 		
> 		--Automatic Transmission
> 		if _TMode == "Auto" and _IsOn then
> 			_ClutchOn = true
> 			if _CGear == 0 then _CGear = 1 end
> 			if _CGear >= 1 then
> 				if _CGear==1 and _GBrake > 0  and car.DriveSeat.Velocity.Magnitude < 20 then
> 					_CGear = -1
> 				else
> 					if _Tune.AutoShiftMode == "RPM" then
> 						if _RPM>(_Tune.PeakRPM+_Tune.AutoUpThresh) then
> 							_CGear=math.min(_CGear+1,#_Tune.Ratios-2) 
> 						elseif math.max(math.min(maxSpin*_Tune.Ratios[_CGear+1]*fFDr,_Tune.Redline+100),_Tune.IdleRPM)<(_Tune.PeakRPM-_Tune.AutoDownThresh) then
> 							_CGear=math.max(_CGear-1,1)
> 						end
> 					else
> 						if car.DriveSeat.Velocity.Magnitude > math.ceil(wDRatio*(_Tune.PeakRPM+_Tune.AutoUpThresh)/_Tune.Ratios[_CGear+2]/fFD) then
> 							_CGear=math.min(_CGear+1,#_Tune.Ratios-2)
> 						elseif car.DriveSeat.Velocity.Magnitude < math.ceil(wDRatio*(_Tune.PeakRPM-_Tune.AutoDownThresh)/_Tune.Ratios[_CGear+1]/fFD) then
> 							_CGear=math.max(_CGear-1,1)
> 						end
> 					end
> 				end
> 			else
> 				if _GThrot-(_Tune.IdleThrottle/100) > 0 and car.DriveSeat.Velocity.Magnitude < 20 then
> 					_CGear = 1
> 				end
> 			end
> 		end 
> 		
> 		--Average Rotational Speed Calculation
> 		local fwspeed=0
> 		local fwcount=0
> 		local rwspeed=0
> 		local rwcount=0
> 		
> 		for i,v in pairs(car.Wheels:GetChildren()) do
> 			if v.Name=="FL" or v.Name=="FR" or v.Name == "F" then
> 				fwspeed=fwspeed+v.RotVelocity.Magnitude
> 				fwcount=fwcount+1
> 			elseif v.Name=="RL" or v.Name=="RR" or v.Name == "R" then
> 				rwspeed=rwspeed+v.RotVelocity.Magnitude
> 				rwcount=rwcount+1
> 			end
> 		end
> 		fwspeed=fwspeed/fwcount
> 		rwspeed=rwspeed/rwcount	
> 		local cwspeed=(fwspeed+rwspeed)/2
> 		
> 		--Update Wheels
> 		for i,v in pairs(car.Wheels:GetChildren()) do
> 			--Reference Wheel Orientation
> 			local Ref=(CFrame.new(v.Position-((v.Arm.CFrame*cfWRot).lookVector),v.Position)*cfYRot).lookVector
> 			local aRef=1
> 			local diffMult=1
> 			if v.Name=="FL" or v.Name=="RL" then aRef=-1 end
> 			
> 			--AWD Torque Scaling
> 			if _Tune.Config == "AWD" then _OutTorque = _OutTorque*rtTwo end
> 			
> 			--Differential/Torque-Vectoring
> 			if v.Name=="FL" or v.Name=="FR" then
> 				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-fwspeed)/fwspeed)/(math.max(_Tune.FDiffSlipThres,1)/100))*((_Tune.FDiffLockThres-50)/50))))
> 				if _Tune.Config == "AWD" then
> 					diffMult=math.max(0,math.min(1,diffMult*(1+((((fwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
> 				end
> 			elseif v.Name=="RL" or v.Name=="RR" then
> 				diffMult=math.max(0,math.min(1,1+((((v.RotVelocity.Magnitude-rwspeed)/rwspeed)/(math.max(_Tune.RDiffSlipThres,1)/100))*((_Tune.RDiffLockThres-50)/50))))
> 				if _Tune.Config == "AWD" then
> 					diffMult=math.max(0,math.min(1,diffMult*(1+((((rwspeed-cwspeed)/cwspeed)/(math.max(_Tune.CDiffSlipThres,1)/100))*((_Tune.CDiffLockThres-50)/50)))))
> 				end
> 			end
> 			
> 			_TCSActive = false
> 			_ABSActive = false
> 			--Output
> 			if _PBrake and ((_Tune.Config ~= "FWD" and (((v.Name=="FL" or v.Name=="FR") and car.DriveSeat.Velocity.Magnitude<20) or ((v.Name=="RR" or v.Name=="RL") and car.DriveSeat.Velocity.Magnitude>=20))) or (_Tune.Config == "FWD" and (v.Name=="RR" or v.Name=="RL"))) then
> 				--PBrake
> 				v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*PBrakeForce
> 				v["#AV"].angularvelocity=Vector3.new()
> 			else
> 				--Apply Power
> 				if ((_TMode == "Manual" or _TMode == "Semi") and _GBrake==0) or (_TMode == "Auto" and ((_CGear>-1 and _GBrake==0 ) or (_CGear==-1 and _GThrot-(_Tune.IdleThrottle/100)==0 )))then
> 					local driven = false
> 					for _,a in pairs(Drive) do if a==v then driven = true end end
> 					if driven then
> 						local on=1
> 						if not script.Parent.IsOn.Value then on=0 end
> 						local throt = _GThrot
> 						if _TMode == "Auto" and _CGear==-1 then throt = _GBrake end
> 						
> 						--Apply TCS
> 						local tqTCS = 1
> 						if _TCS then
> 							tqTCS = 1-(math.min(math.max(0,math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.TCSThreshold)/_Tune.TCSGradient,1)*(1-(_Tune.TCSLimit/100)))
> 						end
> 						if tqTCS < 1 then
> 							_TCSActive = true
> 						end
> 						
> 						--Update Forces
> 						local dir = 1
> 						if _CGear==-1 then dir = -1 end
> 						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*_OutTorque*(1+(v.RotVelocity.Magnitude/60)^1.15)*throt*tqTCS*diffMult*on
> 						v["#AV"].angularvelocity=Ref*aRef*_spLimit*dir
> 					else
> 						v["#AV"].maxTorque=Vector3.new()
> 						v["#AV"].angularvelocity=Vector3.new()
> 					end
> 					
> 				--Brakes
> 				else
> 					local brake = _GBrake
> 					if _TMode == "Auto" and _CGear==-1 then brake = _GThrot end
> 					
> 					--Apply ABS
> 					local tqABS = 1
> 					if _ABS and math.abs(v.RotVelocity.Magnitude*(v.Size.x/2) - v.Velocity.Magnitude)-_Tune.ABSThreshold>0 then
> 						tqABS = 0
> 					end
> 					if tqABS < 1 then
> 						_ABSActive = true
> 					end
> 					
> 					--Update Forces
> 					if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then
> 						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*FBrakeForce*brake*tqABS
> 					else
> 						v["#AV"].maxTorque=Vector3.new(math.abs(Ref.x),math.abs(Ref.y),math.abs(Ref.z))*RBrakeForce*brake*tqABS
> 					end
> 					v["#AV"].angularvelocity=Vector3.new()
> 				end
> 			end
> 		end
> 	end
> 
> 
> 
> --[[Flip]]
> 
> 	function Flip()
> 		--Detect Orientation
> 		if (car.DriveSeat.CFrame*CFrame.Angles(math.pi/2,0,0)).lookVector.y > .1 or FlipDB then
> 			FlipWait=tick()
> 			
> 		--Apply Flip
> 		else
> 			if tick()-FlipWait>=3 then
> 				FlipDB=true
> 				local gyro = car.DriveSeat.Flip
> 				gyro.maxTorque = Vector3.new(10000,0,10000)
> 				gyro.P=3000
> 				gyro.D=500
> 				wait(1)
> 				gyro.maxTorque = Vector3.new(0,0,0)
> 				gyro.P=0
> 				gyro.D=0
> 				FlipDB=false
> 			end
> 		end
> 	end
> 
> 
> 
> --[[Run]]
> 
> 	--Print Version
> 	local ver=require(car["A-Chassis Tune"].README)
> 	print("//INSPARE: AC6 Loaded - Build "..ver)
> 	
> 	--Runtime Loops
> 	
> 	-- ~60 c/s
> 	game["Run Service"].Stepped:connect(function()
> 		--Steering
> 		Steering()
> 		
> 		--RPM
> 		RPM()
> 		
> 		--Update External Values
> 		_IsOn = script.Parent.IsOn.Value
> 		_InControls = script.Parent.ControlsOpen.Value
> 		script.Parent.Values.Gear.Value = _CGear
> 		script.Parent.Values.RPM.Value = _RPM
> 		script.Parent.Values.Horsepower.Value = _HP
> 		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
> 		script.Parent.Values.TransmissionMode.Value = _TMode
> 		script.Parent.Values.Throttle.Value = _GThrot
> 		script.Parent.Values.Brake.Value = _GBrake
> 		script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
> 		script.Parent.Values.SteerT.Value = _GSteerT
> 		script.Parent.Values.PBrake.Value = _PBrake
> 		script.Parent.Values.TCS.Value = _TCS
> 		script.Parent.Values.TCSActive.Value = _TCSActive
> 		script.Parent.Values.ABS.Value = _ABS
> 		script.Parent.Values.ABSActive.Value = _ABSActive
> 		script.Parent.Values.MouseSteerOn.Value = _MSteer
> 		script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity
> 	end)
> 	
> 	-- ~15 c/s
> 	while wait(.0667) do
> 		--Power
> 		Engine()
> 		
> 		--Flip
> 		if _Tune.AutoFlip then Flip() end
> 	end
> 
> --[[END]]

Here you go!

1 Like

The issue is caused because the player standing on the boat keeps blocking your boat’s movement. The ship’s movement replicates, but the other player’s character lags behind a little, because their client only starts moving the character when it sees the ship moving. This is a long-standing issue with Roblox and also the reason why other people’s characters are capable of bouncing back speeding cars in other games, or why people standing on top of vehicles you’re driving appear to be hovering behind you when you’re moving.

You should be able to verify this: If the player is standing in front of the mast, the issue you’re showing will occur. If the player is standing beside or behind it, you should be able to move the boat just fine.

Unfortunately, there isn’t really a ready solution to fix this. You could try to fix this by making the whole boat non-collidable with players for the driver using the collision filtering API. Note that you’ll have to create the relevant collision groups on the server, but you can add parts to them on the client, as far as I’m aware.

Ok, thank you :smiley:

Textlimittextlimit