Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

attempt to call a RBXScriptConnection value but why?

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

5 comments

0

Usually it says "attempt to call a RBXScriptConnection" when you do "Event(function..." instead of "Event:Connect(function..."

0

Right, this is why i am confused why is it not working.

0

Try Plugin.OnRunning:Connect. What does it say?

1

Rly confusing

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

1 answer

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())

2 comments

0

You're using team create

0

I fixed it, thanks for the help !

This discussion is preserved as it was. New answers, comments, and votes are closed.