Hey, I’ve been wondering why lua doesn’t allow functions to be sent to server using remote events.
eg:
-- client
local event = game.ReplicatedStorage.event
event:FireServer(function()
print("wow")
end)
-- server
local event = game.ReplicatedStorage.event
event.onServerEvent:Connect(function(p,func)
print(func) -- prints nil
func() -- errors
end)
I don’t know if this is a bug, or lua just doesn’t allow it. I just wanna be able to transfer functions to server that way…