So, I've been experimenting with player teleportation and I ran into an issue when trying to teleport a player, it keeps teleporting me to this game https://www.roblox.com/games/988567409/Lewisrebecca59s-Place when trying to teleport a player. This is the code I'm currently using.
local TeleportService = game:GetService("TeleportService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local Player = game.Players.LocalPlayer
local playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")
local placeId = 2735733830
local loadingGui = ReplicatedStorage:WaitForChild("LoadingGui")
script.Parent.MouseButton1Click:connect(function()
loadingGui.Parent = playerGui
loadingGui.Enabled = true
TeleportService:SetTeleportGui(loadingGui)
TeleportService:Teleport(placeId)
end)

6 comments
that makes no sense
Please disregard, realized I had another script declaring Placed as a different variable ;/
You can submit an answer and mark it as accepted, or delete your question if you want.
^ Putting [Solved] in your title makes the question show it’s answered too I think.
You defined Player.LocalPlayer twice, use the Variable it's already tied to
This is a LOCAL script!? Why not a server script?