Hi, devforum. How can i turn the teleportation line of this code into a pcall? I need to make sure the player gets teleported. I’m very new to pcalls.
local players = game:GetService("Players")
local tps = game:GetService("TeleportService")
local prefix = "/"
players.PlayerAdded:Connect(function(plr)
plr.Chatted:Connect(function(msg)
if msg == prefix.."campaign" then
tps:Teleport(17580142383, plr)
end
end)
end)