Hi peeps. Do you know in those camping story games where you go to the car, van, bus, etc., and it teleports you to a random seat until the bus is full? Well yeah that's what i'm trying to do. Also what if the seat the player teleports to already has someone sitting in it? Can you make the game like teleport you to a seat that's empty? Thank you!
COMMUNITY QUESTION
How to make a part that teleports you to a seat and automatically makes you sit down?
1 answer
First we need to detect if a player touches the pad.
local part = script.Parent
function onTouched(part)
end
part.Touched:Connect(function()
now teleportation ....
local part = script.Parent
function onTouched(part)
local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)
character.Position = Seat.Position
end
part.Touched:Connect(function()
detecting if seat is full:
local function seat()
local seat1 = workspace.Bus.seat1
local seat2 = workspace.Bus.seat2
local seat3 = workspace.Bus.seat3
if seat1.Occupant = "" then
seat1 = open seat
elseif seat2.Occupant = "" then
seat2 = open seat
elseif seat3.Occupant = "" then
seat3 = open seat
end
end
full script:
local seat1 = workspace.Bus.seat1
local seat2 = workspace.Bus.seat2
local seat3 = workspace.Bus.seat3
if seat1.Occupant = "" then
seat1 = openseat
elseif seat2.Occupant = "" then
seat2 = openseat
elseif seat3.Occupant = "" then
seat3 = openseat
local part = script.Parent
function onTouched(part)
local character = game.Workspace.Player
local player = game.Players:GetPlayerFromCharacter(character)
character.Position = workspace:FindFirstChild("openseat").Position
end
part.Touched:Connect(function()
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Thanks!! I'll try it (forgot to mention that I already have a teleportation pad, in case you didn't know :3)
may not work, not sure any questions? ask me