Hi!
I'am a noob in scripts, so i wanna ask you whats wrong in this script, what saves model to table and create a key to load it.
First script is this:
function onClicked(click) local dataStore = game:GetService("DataStoreService"):GetDataStore("ItemSave") local itemTable = {} for i,v in pairs(game.Workspace.Tycoon:GetChildren()) do table.insert(itemTable, v.Name) end local condensedData = game:GetService("HttpService"):JSONEncode(itemTable) local playerObject = click dataStore:UpdateAsync(click.UserId, function() return condensedData end) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
This script is search model in workspace, save it to table (i think) and create a player key to load this model later.
After player rejoin, he was press button what activate this script:
function onClicked(click) local playerObject = click game:GetService("DataStoreService"):GetDataStore("ItemSave"):GetAsync(click.UserId) end script.Parent.ClickDetector.MouseClick:connect(onClicked)
So, this is not work. When i wanna save model, output says: Request was throttled. Try sending fewer requests. Key =(keycensored)
Guys, i hope you really help me, because i create my game so long and i tired, i was created a big count of models and now i write a scripts, so if this script did not work, i need to destroy a lot of my models.
Thanks from future.