Making a random place teleporter but each time I rejoin the game I get placed into the same place..
local Places = {"6597705", "12468179", "339293087","279238899", "10705224","52681367", "195845601", "23243758","8274990", "399059252","195142853", "510444657","372328925", "541548703", "141461667", "662417684", "195845601", "574407221", "414288170", "39972972", "657859644", "23243758", "439998024", "541548703" ,"126945035"} local TeleportService = game:GetService("TeleportService") print("The database has: "..#Places.." places available. :)") math.randomseed(tick()) game.Players.PlayerAdded:connect(function(player) if player then local randomId = Places[math.random(1, #Places)] print(randomId) TeleportService:Teleport(randomId, player) print('Bye have a great time!') end end)
math.random isn't truly random. Computers cannot generate random numbers so it will go in the same order every time. Use something like this to make it different each time :
math.randomseed(tick()) for _ = 1, 10 do --put your teleport stuff here end
If I didn't explain it well enough, look at this wiki page for more information on random numbers.