--Scripted by DermonDarble


local character = script.Parent.Parent
local humanoid = character:WaitForChild("Humanoid")
local seat = character:WaitForChild("Seat")
local occupant = seat.Occupant

script.Parent.Parent.Seat.Changed:connect(function(property)
	if seat.Occupant ~= occupant then
		occupant = seat.Occupant
		if occupant then
			local player = game.Players:GetPlayerFromCharacter(occupant.Parent)
			if player then
				local localControlScript = script.LocalControlScript:Clone()
				localControlScript.Horse.Value = character
				localControlScript.Parent = player.PlayerGui
				localControlScript.Disabled = false
			end
		end
	end
end)
