I’m making an item system using OOP, and when I require the class module I want a signal to be created on the server and the client to connect that. I’ve tried doing so however it seems that these events only replicate if written BEFORE runtime.
This is my current setup, the server can see the signal but the client cannot, because it was created AFTER runtime, even though it was created in the client.
function Firearm_Server:Init()
Item.Init(self)
Knit.GetService("ItemService").Client[script.Parent.Name] = {}
Knit.GetService("ItemService").Client[script.Parent.Name].NewSignal = Knit.CreateSignal()
end
function Firearm_Client:Init()
Item.Init(self)
Knit.GetService("ItemService")[script.Parent.Name].NewSignal:Connect(function()
print("GOT!")
end)
end
Edit: I worded this very weirdly, essentially, anything added to the Client table after runtime is not replicated to the client, and I want to find a way to circumvent this so that each class can have it’s own signal instead of one signal for every single class to share.