Ok, so I posted a script similar to this before, but I revised it and it works on studio mode and studio mode only. I want it to teleport me to a game I made. Since the game is active, it will teleport me, but only in studio mode! I don't know what to do to fix it. whenever I click the button, the game lags and nothing happens. I turned it into a local script to see if i just needed to address the local player. here is my code:
local Part = workspace.Classic.Clickable
local CD = Part.ClickDetector
local GameId = 1233428613
local plr = game.Players.LocalPlayer
CD.MouseClick:connect(function()
game:GetService('TeleportService'):Teleport(GameId, plr)
end)
it seems so simple. What's the answer?
