When 8 people are touching this scripts parent, which is player_teleporter this script will start local MainPrt = script.Parent local TeleportID = 1 --ID OF MY PLACE MainPrt.Touched:Connect(function(Prt) for _,Plr in pairs(game.Players:GetPlayers()) do if Plr.Character then if Prt:IsDescendantOf(Plr.Character) then game:GetService("TeleportService"):Teleport(TeleportID,Plr) end end end end)
here is the script i made so far. it doesnt work. i need help. pls tell me where my mistake is and how i fix it.
local touchCount = 0 local touchers = {} script.Parent.Touched:Connect(function(p) if p:IsA("BasePart") then touchCount = touchCount + 1 table.insert(touchers,p.Parent.Name) end end) local TeleportID = 1 spawn(function() while true do wait() if touchCount >= 8 then for_, Plr in pairs(game.Players:GetChildren()) do game:GetService("TeleportService"):Teleport(TeleportID,Plr) end end end end)
this is suppose to teleport the player once touchCount is greater than or equal to 8, i would recommend you add a TouchEnded, anyways, good luck... tell me if it works, click accept if it works.