function createsave1(player)
local playersData
local success, errormessage = pcall(function()
playersData = game:GetService("DataStoreService"):GetDataStore("DSCharSave1"):GetAsync(player.UserId.."_CharDataSave1")
end)
if success then
warn("Got players data successfully!")
if playersData then
CharacterTable = playersData
warn("Applied stats table!")
end
end
if errormessage then
warn("ERROR FINDING/CREATING SAVE 1: " .. errormessage)
end
end
CreateSave1.OnServerEvent:Connect(function(player)
CreateSave1(player) -- <- this is the line in the error that comes up
warn("Successfully Created Save 1!")
end)
error is: ServerScriptService.SavesManager:Line highlighted in code: attempt to call a instance value
That is happening because you have a RemoteEvent defined as “CreateSave1” and a function defined as “createsave1”. See the difference? You then call a RemoteEvent instead of a function. It is better to name things differently and not rely on casing.
Yeah this is a pretty big security issue.
They should rate limit the event on the server so people don’t just spam the remote event and fill the DataStore request queue.
This would make it so any other player can’t save while it’s waiting for the debounce.
If they make a debounce on the clinet exploiters can just make a loop and fire the event many times a second and make it so no data saves.