i want to teleport the player to another place but it won't work

the code:

local player = game:GetService("Players").LocalPlayer
local TP = game:GetService("TeleportService")

script.Parent.MouseButton1Click:Connect(function()
	TP:Teleport(placeid, player)
end)

the placeid is the place id i have in my game not local placeid

3 comments

0

Is this script a local script or a server script

0

a server script

0

oh wait nevermind i found a fix