I have a question say for instance when you press play and the place you got to and if you leave it and rejoin and press play again it send s you back to the place you where in and not the a different place. How would I do that exactly with what me and my friend have already done making it to where it sends you back to the place you was in and not any other place?
local places = {
{10359953810, 21, "Earth1"},
{10336690426, 26, "Name1"},
}
Butons.Play.MouseButton1Click:Connect(function()
print('MouseButton1Click')
local Stats = game.ServerStorage.PlayerData[player.Name].Stats
print('Stats')
local TotalRaceRarity = 0
for _,RaceRarity in pairs(places) do
TotalRaceRarity = TotalRaceRarity + RaceRarity[2]
end
local Chance = math.random(1,TotalRaceRarity)
local Counter = 0
local Chosen = nil
local ChosenName = ""
for _,RaceData in pairs(places) do
Counter = Counter + RaceData[2]
if Chance <= Counter then
Chosen = RaceData[1]
ChosenName = RaceData[3]
break
end
end
gui.Home.Text = "Home Planet:"..ChosenName
wait(3)
TeleportService:TeleportAsync(Chosen, {player}, Instance.new("TeleportOptions"))
print(Chosen)
print('Teleporting Human')
end)```