local v={}function getSeats(s)for s,C in pairs(s:GetChildren())do if C:IsA("\086\101\104\105\099\108\101\083\101\097\116")or C:IsA("\083\101\097\116")then local s={}s.Seat=C s.Parts={}table.insert(v,s)end getSeats(C)end end getSeats(bike)function getPProperties(v,s)for v,C in pairs(v:GetChildren())do if C:IsA("\066\097\115\101\080\097\114\116")then if C.CustomPhysicalProperties==nil then C.CustomPhysicalProperties=PhysicalProperties.new(C.Material)end table.insert(s,{C,C.CustomPhysicalProperties})C.CustomPhysicalProperties=PhysicalProperties.new(0,C.CustomPhysicalProperties.Friction,C.CustomPhysicalProperties.Elasticity,C.CustomPhysicalProperties.FrictionWeight,C.CustomPhysicalProperties.ElasticityWeight)end getPProperties(C,s)end end for v,s in pairs(v)do s.Seat.ChildAdded:connect(function(v)if v.Name=="\083\101\097\116\087\101\108\100"and(v:IsA("\087\101\108\100")and(v.Part1~=nil and(v.Part1.Parent~=workspace and not v.Part1.Parent:IsDescendantOf(bike))))then s.Parts={}getPProperties(v.Part1.Parent,s.Parts)end end)s.Seat.ChildRemoved:connect(function(v)if v.Name=="\083\101\097\116\087\101\108\100"and v:IsA("\087\101\108\100")then for v,s in pairs(s.Parts)do if s[1]~=nil and(s[2]~=nil and s[1]:IsDescendantOf(workspace))then s[1].CustomPhysicalProperties=s[2]end end s.Parts={}end end)end

	--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(bike)
	
	--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(bike) 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


