Problems with player sitting on seat and moving them to another seat

I am trying to move a player from one seat to another seat but a strange bug happens where in the process of unseating them they never go to the next seat. they just stand up… am not sure how to get around this. someone told me i was to clone the seat then destroy it and so on but the bug still occurs.

note: i did not put :Sit() part of code because i didn’t think it be necessary.
code

if isSitting then
		local currentSeat = humanoid.SeatPart
		local seatParent = currentSeat.Parent
		local seatClone = currentSeat:Clone()
		
		currentSeat:Destroy()
		seatClone.Parent = seatParent
	end
2 Likes

You need to use NewSeat:Sit(Humanoid)

1 Like

am doing that it’s just not in the code bit. it’s after. it’s not everytime that they just stand and don’t sit on the new seat.

to fix this i added a temporary bool and connection then repeating :Sit() method until bool is true. this is super bootlegged and i can’t say that i’ll stick with it because am not sure if it would cause issues when 50 players were trying to sit at once… but it does work for now so i will leave it.

local hasSit = false
local connection

connection = humanoid.Seated:Connect(function(_isSeated, _seat)
   hasSit = true
end

repeat
   task.wait(0.1)

   seat:Sit(humanoid)
until hasSit

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.