How can I teleport more than one person, but make it where each person has their own local debounce wait() ?
game.Players.PlayerAdded:connect(function(player)
local bv1 = Instance.new("BoolValue", player)
bv1 = false
if game.Players.LocalPlayer:FindFirstChild("BoolValue") == nil then
local bv = Instance.new("BoolValue", game.Players.LocalPlayer)
bv = false
end
player.CharacterAdded:connect(function(chara)
chara:WaitForChild("Humanoid").Died:connect(function()
if chara:FindFirstChild("BoolValue") == nil then
local bv = Instance.new("BoolValue", chara)
bv = false
end
end)
end)
end)
teleporter
local part = script.Parent
local Teleporter = part.Teleporter
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') and hit.parent:FindFirstChild("BoolValue") == false then
local player = hit.Parent
player.BoolValue = true
player.HumanoidRootPart.CFrame = CFrame.new(Teleporter.Position)
wait(2)
player.BoolValue = false
end
end)
Teleporter.Touched:connect(function(hit) --Old code but imagine debounce being the BoolValue
if hit.Parent:FindFirstChild('Humanoid') and debounce == false then
debounce = true
wait(1)
local player = hit1.Parent
player.HumanoidRootPart.CFrame = CFrame.new(part.Position)
wait(1.5)
debounce = false
end
end)

3 comments
can you explain this in more detail. What do you mean by teleport? the teleport service or moving a player in the workepace.
A player touches a teleport Part which teleports them to the position of another Part
When you make a Value (any value), the name is just "Value". You could change your FindFirstChild's to FindFirstChildOfClass or change where it says "BoolValue@ to just "Value".