local RepStorage = game:GetService("ReplicatedStorage")
local remote = RepStorage:WaitForChild("Remote")
local event = Instance.new("RemoteEvent") -- creates the event object
event.Parent = game.Workspace -- puts the event into the Workspace
event.Name = "MyTeleport"
local RepStorage = game:GetService("ReplicatedStorage")
local remote = RepStorage:WaitForChild("Remote")
local TeleportService = game:GetService("TeleportService")
local level1Id = 468207775
local level2Id = 478464630
local level1SpawnName = {"Spawn1", "Spawn2", "Spawn3", "Spawn4", "Spawn5"}
event.OnServerEvent:connect(function(player)
print("Teleport Done Good")
if player then TeleportService:TeleportToSpawnByName(level1Id , level1SpawnName[math.random(1,#level1SpawnName)], player)
end
end)
Wont teleport at all and there is no errors. All i want it to do is teleport the player to those 5 random spawns in the other game universe. The Ids are correct btw and the print function prints
