So im making a multiplace game
teleporter script in lobby:
local function TeleportPlayers()
local placeId = 13408545241
local server = TeleportService:ReserveServer(placeId)
local options = Instance.new("TeleportOptions")
options:SetTeleportData({Difficulty = script.Parent.Difficulty.Value})
options.ReservedServerAccessCode = server
SafeTeleport(placeId, playersWaiting, options)
print("Finished teleport")
end
Teleporter Model:
the actual game’s join data script:
local Players = game:GetService("Players")
local PhysicsService = game:GetService("PhysicsService")
Players.PlayerAdded:Connect(function(player)
if game["Run Service"]:IsStudio() then
workspace.Info.Diff.Value = "Amateur"
else
local joinDat = player:GetJoinData()
if joinDat then
local difficulty = joinDat.Difficulty
print(joinDat.Difficulty)
--Line 45
workspace.Info.Diff.Value = joinDat.Difficulty
if joinDat.Difficulty ~= ("Amateur" or "Expert" or "Master") then
workspace.Info.Diff.Value = "Amateur"
end
else
workspace.Info.Diff.Value = "Amateur"
end
end
end)
ingame print:
lobby teleporter difficulty value
And when the player got into the game place, the game did not load the difficulty value from the teleport data. What’s wrong??? I already tried finding solutions but still isnt working