I have been a bit confused by the use of return. I kind of know how it works, but don’t understand it enough to know when to use it all of the time.
Like:
repStorage.RemoteEvent.OnServerEvent:Connect(function()
if value.Value == true then
return true -- returning a true value to the script that fired the event
else
return false -- returning a false value to the script that fired the event
end
end)
Is that sort of thing gonna work?
If not, my question is how would I return a value to a script that fired the remote event, like returning a true value from a ServerScript to a LocalScript?
Many thanks!