StarterGui:
ReplicatedStorage.RealmSystem.OnClientEvent:Connect(function(RealmID)
if Teleport == false then
Teleport = true
FadeInBackground:Play()
FadeInBackground.Completed:Wait()
SizeOutLogo:Play()
SizeOutLogo.Completed:Wait()
local result = ReplicatedStorage:FindFirstChild("TeleportationSystem"):InvokeServer(RealmID)
print(result)
end
end)
ServerScriptService:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TeleportService = game:GetService("TeleportService")
ReplicatedStorage.TeleportationSystem.OnServerInvoke = function(player,ID)
print(player.Name,ID)
local success,fail = pcall(function()
TeleportService:Teleport(player,ID)
end)
if not success then
return "Error"
end
end