Event onPlayerJoining was not safe for net

So, I get “Event onPlayerJoining was not safe for net” message in game console (F8) and script doesn’t do what it has to do.

Even simple code as

AddEventHandler('onPlayerJoining', function(spawn)
	TriggerEvent('chatMessage', 'SYSTEM', {255, 255, 255}, "Welcome!")
end)

Gives me this deny. How come?

onPlayerSpawn for event client