-
What do you want to achieve? Keep it simple and clear!
hi i’m testing a lobby game teleporter in my game that teleports players in the house to the game just like camping -
What is the issue? Include screenshots / videos if possible!
when im testing the game with two players. the teleport service doesn’t teleport one person to the game. screenshots below:
me and other player in teleporter
the other player the only one that teleported to game
me who has this error
the other player has role to go play the private games and the place is published btw so idk why only me the owner of the group cant go to the game
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
nope i didnt find any solutions when I searched the devforums
this is my code (kinda complicated)
local lighting = game:GetService("Lighting")
local CollectionService = game:GetService("CollectionService")
local players = game:GetService("Players")
local houses = CollectionService:GetTagged("houselobby")
local run = game:GetService("RunService")
local teleport = game:GetService("TeleportService")
local housetimedefault = 10
lighting.FogEnd = 400
local houseguests = {}
local housetimes = {}
for i, v in pairs(houses) do
print("aaa")
local door = v:WaitForChild("ClassicHouseDoor")
local partprox = door:WaitForChild("PartProx")
local prox = Instance.new("ProximityPrompt")
local teleportpart = v:WaitForChild("PartTeleport")
local playerlimit = v:WaitForChild("PlayerLimit")
local teleportpartexit = v:WaitForChild("PartTeleportExit")
local playerlist = v:WaitForChild("HouseListPart")
local doorsound = script["Door Opening"]:Clone()
doorsound.Parent = partprox
local joiners = {}
prox.ActionText = "Enter/Exit"
--prox.MaxActivationDistance = prox.MaxActivationDistance*2
prox.RequiresLineOfSight = false
prox.Parent = partprox
housetimes[i] = housetimedefault
houseguests[i] = {}
local joiners = houseguests[i]
prox.Triggered:Connect(function(ply)
local gamer = table.find(joiners, ply)
if not gamer and (#joiners < playerlimit.Value) then
ply.Character:MoveTo(teleportpart.Position)
joiners[#joiners+1] = ply
doorsound:Play()
end
if gamer then
ply.Character:MoveTo(teleportpartexit.Position)
table.remove(joiners, gamer)
doorsound:Play()
end
print(joiners)
end)
run.Stepped:Connect(function()
playerlist.Time.BillboardGui.TextLabel.Text = housetimes[i]
playerlist.PlayerList.BillboardGui.TextLabel.Text = #joiners.. "/".. playerlimit.Value
end)
end
players.PlayerAdded:Connect(function(ply)
ply.CharacterRemoving:Connect(function()
for i, v in pairs(houseguests) do
local gamer = table.find(v, ply)
if gamer then
table.remove(v, gamer)
end
end
end)
end)
while true do
wait(1)
for i, _ in pairs(housetimes) do
print("eee")
if not (housetimes[i] == 0) then
housetimes[i] -= 1
else
local guests = houseguests[i]
if #guests > 0 then
local success, response = pcall(function()
local code = teleport:ReserveServer(14837592897)
teleport:TeleportToPrivateServer(14837592897, code, guests)
end)
if response then
warn("TELEPORT ERROR!! HOUSE ".. i.. " ".. response)
end
end
housetimes[i] = housetimedefault
end
end
end
me and the other player is just two accounts in the same computer to test the teleporting and I did that using bloxstrap by allowing more than one roblox program allowed to open so idk if that’s the problem