Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Filtering Enabled teleport script help?

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 answer

You don't need to use RemoteEvents to teleport yourself. You just need them if you want to teleport other players.

1 comment

0

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

This discussion is preserved as it was. New answers, comments, and votes are closed.