I have this on the server-side:
ReplicatedStorage.ChangeParam.OnServerEvent:Connect(function(player, param, new, folder, save)
if folder == "leaderstats" then
player.leaderstats:FindFirstChild(param).Value = new
elseif folder == "data" then
player.data:FindFirstChild(param).Value = new
end
if save then
save_data(player)
end
end)
-- Where save_data(player) saves the data.
and can be called in the client-side with:
ReplicatedStorage:WaitForChild("ChangeParam"):FireServer("has_done_intro", true, "data", true)
The thing is, a guy yesterday told me that this is very insecure against hackers and can be easily exploited. How can I make it more secure, and what's exploitable about it now?

3 comments
You simply can't.
So there always will be hackers?
You might want to look at https://forum.scriptinghelpers.org/topic/112/how-to-use-remoteevents-properly