Hello all! I was simply wondering, is there a way to make this teleport script able to detect if a certain amount of players are touching a brick, then teleport those players to a different game, sort of like Prison Royale.
local TeleportService = game:GetService("TeleportService")
local Place = 0
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
TeleportService:Teleport(Place, player)
end
end)

3 comments
How would I go about coding that using my script? As I am new to the matter, and don't quite understand what you mean.
Parts have the .Touched() event which is fired when a basepart collides with it, it gives you an argument which is the basepart that it collided with, you can check the Wiki for "BasePart", the Players service in game is also very useful as it even allows you to get a Player just by using their character.
Okay sweet.