I want to teleport the player to a certain place while filtering enabled is turned on, but the player won't teleport to the place even though there is no error in the output and I can still click the button(in the gui)
-- Server Script(workspace > remote event > script
button = game.Workspace.StarterGui.StartMenu.StartMenuFrame.StartGame
player = game.Players.LocalPlayer
tele = game:GetService("TeleportService")
level1id = 864169711
game.Workspace.TPEvent.OnServerEvent:connect(function() -- checks when the event is fired
tele:Teleport(level1id, player) -- teleports
end)
-- Local script(screen gui > frame > text button > local script
TPEvent = game.Workspace.TPEvent -- name of the RemoteEvent
script.Parent.Clicked:connect(function() -- when the button is clicked
game.Workspace.TPEvent:FireServer()
end)

1 comment
yeah sorry that's what i meant, "player" as in everyone that joins the game, sorry xD