local evt = game.ReplicatedStorage:WaitForChild("Btn")
local ts = game:GetService("TeleportService")
local as = game:GetService("AssetService")
evt.OnServerEvent:Connect(function(player)
print("Saving place")
as:SavePlaceAsync()
print("Place saved")
--[[print("Creating place")
local placeid = as:CreatePlaceInPlayerInventoryAsync(
player,
"Test for " .. tostring(player.Name),
3220618567,
"Automatically generated description"
)
print("Teleporting player")
ts:Teleport(placeid, player)]]
end)
The ultimate goal of the code:
To automate selling models to players.
You can see the place here, once i get a working copy of the system, im going to post a guide on here on how to set it up. https://www.roblox.com/games/3197131211/Tivan-Homestore
As a side note, it says in the SavePlaceAsync website that the place has to be created by CreatePlaceAsync for it to work. Is your place created this way?
HttpService isn’t in the explorer. If you go into studio and click on game settings on the home screen in the top bar and then click options you will see HttpService.
I believe SavePlaceAsync has been bugged in general and there’s been no response (the people having issues with it have never filed a bug report, nor has the error message been addressed).
Do a quick check and see if your place saved, as opposed to assuming the method doesn’t work based on the fact that the method throws an error. If you’re still experiencing the issue and the place hasn’t been saved, file a bug report with all relevant information leading up to the error.