Can clients alter server side code that's required from both client/server module?

If I have a module like so

local RunService = game:GetService('RunService')

if RunService:IsServer() then
-- Do server stuff
end

if RunService:IsClient() then
-- Do client stuff
end

Could an exploiter take the stuff inside the server function and then run it from their client?

No, when you require a module both the client and the server have their own copy of whatever was returned. As for your second question, they could call that function but it would error if it relied on stuff that only exists on the server.

1 Like