I've never really understood when I should use remote events over remote functions or the other way around. I always use remote events and never have used remote functions, should I be using them for certain things?
Let's say you use remote events when you want something to run in another script that's not on the same type of script as the one you fire it from.
You use a remote function when you need a value returned by the function, a practical example:
localscript:
local remfunction = game.ReplicatedStorage.RemoteFunction print(remfunction:InvokeServer())
script:
local x = "potato" local remfunction = game.ReplicatedStorage.RemoteFunction local function returnpotato() return x end remfunction.OnServerInvoke = returnpotato()
The local script in the above example would print "potato".
Please do a quick search in Google before asking your question:
https://gyazo.com/94ddf90fb2b72b9d81be34c8db660ab8
https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events