I made this script:
function sit(child)
if child.Name == "SeatWeld" then
character = child.Part1.Parent
if player.Value ~= character.Name then -- check if the player is the one I want
child:Destroy()
end
end
end
script.Parent.ChildAdded:connect(sit)
It's supposed to destroy the seatweld when an undesired player sits, but when I tried to seat there, it didn't work and the output said this: Something unexpectedly tried to set the parent of SeatWeld to NULL while trying to set the parent of SeatWeld. Current parent is Seat. What is wrong? I didn't try to change it's parent, so why that error?

2 comments
Hhmm... I don't know much about Debris service and stuff like that, so can I use a little wait()? Thanks btw.
adding wait() before changing its parent/removing it would also work.