VehicleSeat not working after one usage

As the title says, im using this code:

local prompt = script.Parent
local seat = prompt.Parent

script.Parent.TriggerEnded:Connect(function(plr)
	print("trig")
	repeat seat:Sit(plr.Character.Humanoid)
		task.wait()
		print("frame")
	until seat.Occupant ~= nil
end)

I am using a very simple method of sitting the character into a vehicleseat by using a proximity prompt and seat:Sit().

However, after one usage of the seat (sitting in and getting up which works perfectly) the seat refuses to register the :Sit function. Triggering it through touching the seat and the prompt both do not work.

This is a server script. No errors.

On the 2nd attempt the word “frame” would be spammed endlessly into the output and never stop.

It seems to be working for me when I try to replicate this in studio using a normal vehicleseat.

Agreed.

Script works fine in a new baseplate.

Must be something else.

@Ryanelevatorfire @mc7oof
Im using a modified playerModule for some camera stuff so that might be it. But the seats work in another place with the same module. Ive programmed some custom seats for now but the reason behind this still remains a mystery.

Im pretty sure nothing is interfering with the sitting mechanics.