TeleportService isn't working

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want too make it whereas the player gets teleported to another game if they met the group requirements.
  2. What is the issue? Include screenshots / videos if possible!
    It’s not teleporting the player.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    Looked on the forums, but nothing useful.
local TeleportService = game:GetService("TeleportService")

local place = 6379660376

game.Players.PlayerAdded:Connect(function(Player)
	if Player:IsInGroup(1) or Player:IsInGroup(1) or Player:IsInGroup(2) or Player:IsInGroup(3) or Player:IsInGroup(5) or Player:IsInGroup(3) or Player:IsInGroup(0) or Player:IsInGroup(2) or Player:IsInGroup(7) or Player:IsInGroup(8) or Player:IsInGroup(9) or Player:IsInGroup(1) then
		Player:Kick("You're currently in a banned group")
	elseif Player:IsInGroup(1) then
		Player:Kick("You're already in the group!")
	elseif Player then
		Player=game:GetService("Players"):FindFirstChild(Player.Parent.Name)
		TeleportService:Teleport(place, Player)
	end
end)

Nevermind, I found a solution myself.

1 Like

Could you explain what that solution entails so you’re marking an actual solution rather than just you saying you found one? Others might be having the same problem and sharing what helped you fix it would be helpful if others search and find they have the same problem as you.

Pretty sure the problem here was that he gave a player object and not an array containing all the player’s to be teleported ( i could be wrong but still )

I thought this was related to:
https://devforum.roblox.com/t/teleport-api-simplification-survey/827731/23?u=lucastutoriaissaimo

Teleport takes a single player instance. You’re thinking of TeleportPartyAsync or TeleportToPrivateServer which takes an array of players.