Reputation: 0 [rate]

Joined: Dec, 2021

Profile Picture

Activity Feed

Replied to thread: [HELP] OnClientInvoke w/ .__newindex

@SoundInfinity I was testing it in my own place too and it works! tysm I had been stuck for a couple of days now and I finally found a solution

Replied to thread: [HELP] OnClientInvoke w/ .__newindex

@SoundInfinity Also, when I run your code, nothing still appears in the output.

Replied to thread: [HELP] OnClientInvoke w/ .__newindex

@RealNickk I tried your code It gives me this error: "OnClientInvoke is a callback member of RemoteFunction; you can only set the callback value, get is not available"



local Old; Old = hookfunction(game:GetService("ReplicatedStorage").RemoteFunction.OnClientInvoke, function(...)

    local Args = {...}


    return Old(unpack(Args))



Replied to thread: [HELP] OnClientInvoke w/ .__newindex

@RealNickk Isn't .__namecall used for things that have a ":" in them, for example: RemoteFunction:FireServer()  OnClientInvoke uses "." example: RemoteFunction.OnClientInvoke = function(). I am most likely wrong about that though.

Created a new thread: [HELP] OnClientInvoke w/ .__newindex

I'm new to metatables and I'm trying to write a script that will run whenever "OnClientInvoke" is updated. Here's what I've come up with so far:



local mt = getrawmetatable(game)

local old = mt.__newindex

setreadonly(mt, false)


mt.__newindex = newcclosure(function(self, method, func)

    if self == game:GetService("ReplicatedStorage").RemoteFunction and method == "OnClientInvoke" then

        old_func = func

        func = function(...)

            local args = {...}


            return old_func(...)



    return old(self, method, func)




The issue is that nothing happens when "OnClientInvoke" is updated. I checked the developer console, and there are no errors or warnings. So, if anyone could assist me in resolving this problem, I would really appreciate it.