Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

attempt to call a RBXScriptConnection value but why?

Asked by
imKirda 1110 Moderation Voter
7 days ago
Edited 7 days ago

I have made custom plugin prefab maker, there is a function called onRunning which fires when the module is Initialized (On bindable event).

function Plugin.OnRunning(Connection)
    return Startup.Event:Connect(Connection)
end

return Plugin

In the script, i require the module, which works and then i use the function like this:

Plugin.OnRunning(function()

end)

And here is when it errors. attempt to call a RBXScriptConnection. I can't seem to find out why, the module is connecting the given function to the event so what is not working?

Thanks, kirda

0
Usually it says "attempt to call a RBXScriptConnection" when you do "Event(function..." instead of "Event:Connect(function..." TTChaos 731 — 7d
0
Right, this is why i am confused why is it not working. imKirda 1110 — 7d
0
Try Plugin.OnRunning:Connect. What does it say? TTChaos 731 — 7d
1
Rly confusing TTChaos 731 — 7d
0
The problem is with module replication it's a bug or what, the module with function is not updating it's a roblox bug imKirda 1110 — 7d

1 answer

Log in to vote
0
Answered by
imKirda 1110 Moderation Voter
7 days ago
Edited 7 days ago

Basically the module i am requiring has saved it's old version and now i can't change it, every time i require it it returns the old saved version that must be a roblox bug.

Edit: So the problem is that roblox caches required module script source code. I fixed it by doing

require(MyModule:Clone())
0
You're using team create TTChaos 731 — 7d
0
I fixed it, thanks for the help ! imKirda 1110 — 7d
Ad

Answer this question