So I’m not sure if this is a “strange” behavior, or what is suppose to happen, but for some odd reason what I add to my tables inside the modulescript don’t decide to stay. Really weird!
^ I can clearly see that it is inside the table from that image. But for some odd reason when I call it from another script
Here’s the script I use to register and hide all events.
function EventSpoofer:Register()
for _,v in pairs(Events:GetChildren()) do
EventTable[tostring(v.Name)] = v
v.Name = math.random(1000,9999).."-"..math.random(1000,9999).."-"..math.random(1000,9999)
end
for i,v in pairs(EventTable) do
print(i,v)
end
return EventTable
end
And when I use a different function to cycle through all of the Events within the table nothing is found, anyone know why?
This isn’t strange. What “other script” are you indexing the module from? If this is an issue related to what scripts you’re using; scripts share one instance of a module (once it’s required, every other require returns the same instance) and LocalScripts another. I otherwise don’t know what’s the issue.
If you have a module, and have more than one script require that module, and then have one script put something in a table in that module, all scripts should be able to see that table entry.
However this does not work between the client-server boundary, as each client and server have their own script environment.