Can exploiters edit local script variables?

I’m redoing a gun system, and am wondering how much control potential exploiters would have over the variables stored in the client.

-- In a local script
local bullets = 15
-- Exploiter modified script
local bullets = 15

while true do
    game["Run Service"].Renderstepped:Wait()

    if bullets ~= 15 then
       bullets = 15
    end
end

In the above example, the exploiter gives themselves infinite ammo by changing the code. Would this be possible? And if so, how much of the gun handling should I give to the server to prevent such incidents?

2 Likes

They can. They can do anything they want with their client.

That’s not correct. Exploiters can change anything client side (including local scripts) the only thing being that they can only do it to there own client not to others so in this case exploiters could give them infinite ammo if the local script is dealing with the amount.

To fix the issue you could either add some sort of anti-exploit to see the amount of shots being fired on the server or just deal with the ammo amount on the server side.

I see. Thank you for the help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.