So I made a small little game to use as a shortcut to my favorite games. Then I add buttons that will teleport me to the games… But it doesn’t work when I published it.
At first I tried it and it teleported me to the game, then I copied me script and just changed pasted it to the play buttons of the other games and also changed the place ID to the right game. But now that I did it to all of the games, I am not teleported, what is my mistake?
Script for each button:
local TS = game:GetService("TeleportService")
script.Parent.MouseButton1Click:Connect(function()
TS:Teleport(placeID, game.Players.LocalPlayer) -- instead of placeID i put the ID in
end)
I don’t think it’s an error in my script, because it worked the first time with the same script.
I put everything in a LocalScript. No errors.