I'm confused! Output bar is sending something I can't decode

  1. What do you want to achieve? To teleport to another experiences’ place

  2. What is the issue? The output bar sends this: TeleportAsync must be called from a Server from the script:

local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local TARGET_PLACE_ID = 11089189139
local playerToTeleport = Players:GetPlayers()[1]
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage.Blackout
local TS = game:GetService("TweenService")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local v1 = nil
local Screen = LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("CutScene") 
local Frame = LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("CutScene"):WaitForChild("BlackScreen") -- frame to change bg transparency
Event.OnClientEvent:Connect(function()

	v1 = TS:Create(Frame, TweenInfo.new(1), {BackgroundTransparency = 0}):Play()
	print("📄 Displaying Text...")
	Screen.BlackScreen.Text.TextColor3 = Color3.new(0.654902, 0.654902, 0.654902)
	Screen.BlackScreen.Text.Text = "[~] Welcome, traveler, to the unknown.."
	Screen.BlackScreen.Text.TextTransparency = 0
	game.Workspace["Music/SFX"].TextSFX:Play()
	wait(6)
	Screen.BlackScreen.Text.Text = "[~] No one knows what lays here.. so be careful."
	game.Workspace["Music/SFX"].TextSFX:Play()
	wait(6)
	Screen.BlackScreen.Text.TextColor3 = Color3.new(1, 0.14902, 0.164706)
	Screen.BlackScreen.Text.Text = "[~] You could encounter anything on your journey to the surface.."
	game.Workspace["Music/SFX"].TextSFX:Play()
	wait(7)
	Screen.BlackScreen.Text.TextColor3 = Color3.new(0, 0.333333, 1)
	Screen.BlackScreen.Text.Text = "[~] Beware, legends say there is dangerous things out there."
	game.Workspace["Music/SFX"].TextSFX:Play()
	wait(7)
	Screen.BlackScreen.Text.TextColor3 = Color3.new(0, 0.666667, 0.498039)
	Screen.BlackScreen.Text.Text = "[~] Goodbye for now and stay safe, traveler."
	game.Workspace["Music/SFX"].TextSFX:Play()
	wait(6.5)
	Screen.BlackScreen.Text.TextTransparency = 1
	wait(2.5)
	game.Workspace["Music/SFX"].IntroSFX_ParyxProductions:Play()
	Screen.BlackScreen.Presented.Visible = true
	wait(1)
	Screen.BlackScreen["Paryx Productions LOGO"].Visible = true
	wait(5.5)
	Screen.BlackScreen.Presented.Visible = false
	Screen.BlackScreen["Paryx Productions LOGO"].Visible = false
	wait(1)
	Screen.BlackScreen.Text.TextTransparency = 0
	Screen.BlackScreen.Text.TextColor3 = Color3.new(0.470588, 0.470588, 0.470588)
	Screen.BlackScreen.Text.Text = "[~] Teleporting to the game..."
	print("🚀 Teleporting...")
	TeleportService:TeleportAsync(TARGET_PLACE_ID, {playerToTeleport})
	print("🌌 Successfully teleported, player is now in the Main Game..")
end)

Thanks for replying if you did; and helping me!!

1 Like

You cannot call the function :TeleportAsync() from the client. That is what the error message is saying. You’re code is running on the client (I assume), change it to a server script or use a remote event to teleport the player on the server side.

You can use remote event to make it.

How do I do that? I do not know what Remote Functions/Events are…

I used one of the guides from the roblox scripting guide or whatever it is.

RemoteEvent

You can use :FireServer() to send data from the client to the server. (in your case the TARGET_PLACE_ID doesn’t change so you don’t have to send any data (but you do have to move it to the server script))

Then you connect/listen to .OnServerEvent, once a message has been received you can teleport the player (the sender)

1 Like

Do be wary of exploiters, so you do want to make a check on the server before you actually teleport them, or else they can just teleport to any server they want.