When I attempt to teleport on my main acc it works but on alt acc it just says it is restricted. I’ve enabled third party teleports and made it public as well as publish it.
I’ve read other peoples topics but found nothing that helps
Client Code:
local Button = script.Parent
local Player = game:GetService("Players").LocalPlayer
local char = game.Players.LocalPlayer.Character
local MainMenuGui = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("MainMenuGui")
local LoadingGui = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("LoadingGui")
local ButtonPressedEvent = game.ReplicatedStorage.RemoteEvents.ButtonPressed
Button.MouseButton1Click:Connect(function()
ButtonPressedEvent:FireServer(Player)
end)
Server Code:
local TPService = game:GetService("TeleportService")
local ButtonPressedEvent = game.ReplicatedStorage.RemoteEvents.ButtonPressed
local TPPlaceID = 14689927963
local TeleportGui = game.ReplicatedStorage.TeleportGui
TPService:SetTeleportGui(TeleportGui)
ButtonPressedEvent.OnServerEvent:Connect(function(Player)
local success, result = pcall(TPService:TeleportAsync(TPPlaceID, {Player}))
end)
local Button = script.Parent
local Player = game:GetService("Players").LocalPlayer
local ButtonPressedEvent = game.ReplicatedStorage.RemoteEvents.ButtonPressed
Button.MouseButton1Click:Connect(function()
ButtonPressedEvent:FireServer(Player)
end)
Server
local TPService = game:GetService("TeleportService")
local ButtonPressedEvent = game.ReplicatedStorage.RemoteEvents.ButtonPressed
local TPPlaceID = 14689927963
ButtonPressedEvent.OnServerEvent:Connect(function(Player)
TPService:TeleportAsync(TPPlaceID, Player)
end)
Usually the problem lies on the place accessibility, make sure both places are public to everyone. If that’s not the case, then I’m not sure since :TeleportAsync() does not emit that kind of error regarding of code.