how to properly use remoteevents
xxxxxxxxxx
first never use them without a proper reason aka MUST since they are annoying to
trace
to underestand it properly you should search filtering enabled
now make sure to remember :FireServer, .OnClientEvent -- local scripts
:FireClient, .OnServerEvent -- script
SERVER -> CLIENT CLIENT -> SERVER
trying to access them from the wrong script will cause error
this is how it works you fire to server or client with the arguments
normally :FireServer automatically has player passing through as 1st then
arguments :FireClient dont do that because the server is not a player.
why use them?
because anything that the client does will not be replicated to server and to other
clients best way to pervent exploiters from ruining experiences.
local event = eventpath
event.OnClientEvent:Connect(function( ) print( ) end)
event:FireServer(1,2,3)
--
server script!
event:FireClient(1,2,3)
event.OnServerEvent:Connect(function(plr, ) print(plr, ) end)
note remote events are not the same as bindable events or remote functions all of
them has thier own uses.
best usage:
when player plays a song and want everyone to hear