I have a server script:
local ds = game:GetService("DataStoreService")
local record = ds:GetDataStore("Records")
game.ReplicatedStorage.save.OnServerEvent:Connect(function(sender, target, message)
print("fired, "..sender.name.." to "..target.name.." message is "..message)
local frame = game.StarterGui.Record.Frame
local success, errormessage = pcall(function()
record:SetAsync(target.userId, message)
end)
if success then
frame.save.Text = "Succsesfully sent!"
else
print("that aint it chief")
warn("here is the error "..errormessage)
end
end)
