#Data Saving
1 messages · Page 1 of 1 (latest)
** You are now Level 3! **
Save using player's userid
This is my script right now
yes right now i have toolid on one tool for testing or does all of them have to for it to work
Just make sure the tools you care about saving have the ToolID attribute
the rest will be ignored
ye i have it to one tool but it wasnt getting added back to my inventory
but it was working for my friend
so i dont know if it was my game that is glitched because ive re opened studio and its still not working for me
its probably a local datastore issue
** You are now Level 1! **
do you know anyway to fix it?
will that only wipe my data/
yeah
ok
it resets it
put into a server script sevice ye?
also make sure api services are enabled in studio
ye they are
yes
btw only run it once then delete it
mb i was away for a bit
all good what do i do about this error
try using this instead it has a print so u can see when it does it correctly
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local PlayerDataStore = DataStoreService:GetDataStore("PlayerData")
Players.PlayerAdded:Connect(function(player)
PlayerDataStore:RemoveAsync(tostring(player.UserId))
print("Cleared saved data for", player.Name)
end)