function WeldChanged(h)if h=="\080\097\114\101\110\116"and SeatWeld.Parent==nil then SeatWeld=nil Deactivate()BreakSeatConnections()end end function ChildAdded(h)if h:IsA("\087\101\108\100")then local L=h.Part1 local x=L.Parent local T=game.Players:GetPlayerFromCharacter(x)if T then SeatWeld=h Activate(T)MakeSeatConnections()end end end
----------------------------------
------------FUNCTIONS-------------
----------------------------------

function WeldChanged(property)
	if property == "Parent" and SeatWeld.Parent == nil then
		SeatWeld = nil
		Deactivate()
		BreakSeatConnections()
	end
end
function ChildAdded(child)
	if child:IsA("Weld") then
		local root = child.Part1
		local character = root.Parent
		local player = game.Players:GetPlayerFromCharacter(character)
		if player then
			SeatWeld = child
			Activate(player)
			MakeSeatConnections()
		end
	end
end
