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
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