debug.setconstant
function debug.setconstant(func: (...any) -> (...any) | number, index: number, value: number | string | boolean | nil): ()Parameters
Example
local function DummyFunction()
print(game.Name)
end
debug.setconstant(DummyFunction, 4, "Players")
DummyFunction() -- Output: Players
-- Optimization Level: 1, Debug Level: 1Last updated