Please check it its for a tower defense game it kept saying
DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 1012559870
workspace:FindFirstChild(player.Name..player[v.Name].Value) local data = game:GetService("DataStoreService"):GetDataStore("TowerDataStore") function save(plr)
local saveData = {}
for i, v in pairs(plr:GetChildren())do
if v:IsA("StringValue") then
saveData[v.Name] = v.Value
end
end
data:SetAsync(plr.UserId, saveData)
end
game.Players.PlayerAdded:Connect(function(plr) for i = 1, 5 do local x = Instance.new("StringValue", plr) x.Name = "Tower"..tostring(i) x.Value = "Empty" end local getData local success, errorm = pcall(function() getData = data:GetAsync(plr.UserId) end) if success then if getData then for i, v in pairs(getData) do plr:FindFirstChild(i).Value = v end end end end) game:BindToClose(function() for _, v in pairs(game.Players:GetChildren()) do save(v) end end) game.Players.PlayerRemoving:Connect(function(plr) save(plr) end)
Check this too
local player = game.Players.LocalPlayer
for i, v in pairs(script.Parent:GetChildren()) do if v:IsA("Frame") and v:FindFirstChild("Place") then v:FindFirstChild("Place").MouseButton1Down:Connect(function() if not player[v.Name].Value ~= "Empty" then if script.Placing.Value == nil then local mouse = player:GetMouse() script.Placing.Value = v
spawn(function()
local t = false
while script.Placing.Value ~= nil do
wait()
if t == false then
local tower = game:GetService("ReplicatedStorage").Towers:FindFirstChild(player[v.Name].Value)
if tower then
tower.Name = player.Name..player[v.Name].Value
tower:Clone().Parent = workspace
end
end
if workspace:FindFirstChild(player.Name..player[v.Name].Value) then
workspace:FindFirstChild(player.Name..player[v.Name].Value).HumanoidRootPart.BodyPosition.Position = mouse.Hit.p
end
end
end)
elseif script.Placing.Value ~= nil and script.Placing.Value == v then
script.Placing.Value = nil
end
end
end)
v.TowerName.Text = player[v.Name].Value
player[v.Name].Changed:Connect(function()
v.TowerName.Text = player[v.Name].Value
end)
end
end

3 comments
I know its a bit messy but please check
For starters, you should ALWAYS pcall your Set/Update/GetAsync scripts, just incase it doesnt save. Also, what line are u getting the error from?
Did you turn'd API Services ON? Your script(s) are supporting services.