Using ImageButton to Make a teleport button for a Game But Dosen't work

So I am using an ImageLabel as a teleport label and used a local script which is this one:

script.Parent.ImageButton.MouseButton1Click:Connect(function()

game:GetService(“TeleportService”):Teleport(7046462369, game.Players.LocalPlayer)

end)

And the Problem is that It dosen’t seem to work when I try teleport to the game. I have tried other methods but dosen’t seem to work. Could someone help?

(The circle is the button I want to use a a teleporter)

put that script in textbutton if u dont put in textbutton it probably not work

local TeleportService = game:GetService("TeleportService")

script.Parent.MouseButton1Click:Connect(function()

	TeleportService:Teleport(7046462369, game.Players.LocalPlayer)

end)
1 Like

Thank You. This has really helped.

1 Like

you’re welcome and i recommend you to make your game private so exploiters can’t see your game while making

1 Like