Ive tried everything and I dont know how to mention when the occupation of the seat is true with a humanoid. This is what I have now, local seat = script.Parent --This is the group that has all 6 seats
seat.Touched:connect(function(object)
local character = game.Players:GetPlayerFromCharacter(object.Parent) and
object.Parent
Here and below is how the bus moves, but i want to trigger it once all 6 seats are filled.
for i = 0,-100,-.01 do
script.Parent.Parent.Parent.Parent.Parent:TranslateBy(Vector3.new(0,0,i))
wait(.01)
end
end)


2 comments
Or you could just make an int value that holds the amount of players. The table seems to be useless in this case.
Ive done the table - local busseat = {workspace.Bus1.Truck.VS3.Body.Seats.Folder.Seat1.Occupant'Humanoid',workspace.Bus1.Truck.VS3.Body.Seats.Folder.Seat2.Occupant'Humanoid',workspace.Bus1.Truck.VS3.Body.Seats.Folder.Seat3.Occupant'Humanoid'} table.insert(busseat,workspace.Bus1.Truck.VS3.Body.Seats.Folder.Seat4.Occupant'Humanoid',workspace.Bus1.Truck.VS3.Body.Seats.Folder.Seat5.Occupant'Humanoid',