I've made a custom chat Gui and after making modifications, it seems to have broken. I have a LocalScript in the PlayerGui that's listening for an OnClientEvent that is being called from a server script, with the argument passed through being a TextLabel with the players chatted message. The label is being created fine on the server but my LocalScript is saying it doesn't exist; it's nil.
Appropriate code inside the server script
local event = Instance.new('RemoteEvent', script) ; event.Name = 'on_chatted'
event:FireAllClients(msg_label)
msg_label is a local variable holding the created TextLabel
Appropriate code inside the local script
event.onClientEvent:connect(function(label)
shift_labels(label)
end)
The function is regardless for this matter as 'label' apparently doesn't exist.
Am I being stupid? Missing something obvious?
Any help appreciated.
EDIT:
I changed event:FireAllClients(msg_label) by replacing msg_label with an integer, 1.
local event = Instance.new('RemoteEvent', script) ; event.Name = 'on_chatted'
event:FireAllClients(msg_label)
event.onClientEvent:connect(function(x)
print(x)
end)
The client was able to print the value I sent through, 1. So the problem seems to be with passing a reference to an object. Is this just not doable? If so, is there a workaround?

2 comments
Full Script please? and, WaitForChild, don't forget that.
The full scripts aren't necessary, I just wanted to know if there was anything preventing the passing of objects from server to client like I'm trying to do here.