I'm making a dollar but im trying to find a way to where hackers cannot manipulate the dollar amount aka getting more cash than theyre supposed to get. so im looking for the safest most reliable method:
methods ive tried: 1.clicking a dollar in workspace then it adds to leaderstats then saving the leaderstats data every minute or so but i was thinking that was very exploitable? not sure
2.running this script i got from another member here but it doesnt detect new dollars that are added after the game is already running
for _, detectors in pairs(workspace:GetDescendants()) do
if tostring(detectors) == "dollar" then
detectors.ClickDetector.MouseClick:Connect(function(playerWhoClicked)
print("OwO UwU")
detectors:destroy()
end)
end
end

2 comments
it is a localscript?
its a server script