How do I create a script that makes people spawn on seats in different places than other players spawned?
Basically, what I’m trying to say is that, when someone joins a game, they spawn while sitting in a seat, but if there are more people in different seats, the person who joins the game cannot spawn in those seats. Instead, they spawn in a seat that is not taken by another person.
You could make a bool value called “Taken” and if a person is sitting in it then set the bool value to true, and if the bool value is true, nobody else spawns there
spawnlocation = script.Parent
seat = script.Parent.Parent
while wait() do
if seat.Occupant == "Humanoid" then
spawnlocation.Enabled = false
else
spawnlocation.Enabled = true
end
end
I made the script inside the SpawnLocation.
I’m not sure what I did wrong, but for some reason, the Enabled doesn’t change at all.