I want to know how to load place ID of other players’ game. This is a DIFFERENT question from transferring one game data to another. (I’m saying this to prevent confusion.) For example, in game called “PLS DONATE”, it loads player’s game passes, shirts, or whatever that they are selling. Similarly I want to load players’ game so I can let other people play like this game PLS PLAY (PLS PLAY 🎮 (Donation Game) - Roblox). I want to load this data by script.
So the input would be the player’s Id and the output would be the place ID of the games that the player owns.
What you could do, is add a single Part to Workspace and add a normal Script to the Part. Afterwards add the Place ID that you want the Player to teleport and then you want to add another Place connected to your original base and turn API Option “Allow Third Party Teleport” to true.
I will give you the Script once I wake up property I literally just woken up.
Thank you for your response. Unfortunately, I ran few tests with the code you gave me by using my own User Id and it didn’t work out. I will show you.
YOUR CODE (LITTLE BIT OF EDIT BY ME):
local HttpService = game:GetService("HttpService")
local Endpoint = "https://games.roproxy.com/v2/users/%s/games?sortOrder=Asc&limit=10"
local function getPlayerExperiences(UserId)
-- Sends a requjest to the API
local playerExperiences = nil
local success, errormessage = pcall(function()
playerExperiences = HttpService:GetAsync(string.format(Endpoint, UserId))
end)
-- If the request was successful
if success then
playerExperiences = HttpService:JSONDecode(playerExperiences) -- Converts the json response to a LUA table
warn(errormessage)
return playerExperiences
else
return nil
end
end
print(getPlayerExperiences("2586005014"))
I ran this code in Server script in ServiceScriptSerivce.