The script posted has… local teleportdata = {} …missing up top and is showing an error mark in the Studio.
1 Like
ah, i finally get it now, please refer to the previous post you’ve made…
You’re using an array as if it was a dict
You’d have to do
game.Players.PlayerAdded:Connect(function(player)
task.wait(3)
local joindata = player:GetJoinData()
local teleportdata = joindata.teleportdata
local colonyvalue = teleportdata[player.Name][2]
end)
1 Like
over or under game.players.playeradded
local teleportservice = game:GetService("TeleportService")
local replicatedstorage = game.ReplicatedStorage
local escapeguione = replicatedstorage:WaitForChild("EscapeGuiOne")
local teleportdata = {}
So over … Then down in touched change that to:
teleportdata = {}
You’re using the reference in:
teleportoptions:SetTeleportData(teleportdata)
So it needs to be a script global, in this case a resetting global in touched.
TeleportData is declared inside the function already, although it’s a global var…
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.