Setting variable to what a remote function returns?

so once a player sends a “changecolor” event to the server the server attempts to get the players “settings” table and sends a modified version back to the client. one Issue I have is that when trying to set a variable to the table it sets it to the function instead. how do I fix this?
Issue:

local kal = storage:WaitForChild("events"):WaitForChild("getsettings").InvokeClient

You would need to use:
local RE = game.replicatedstorage.yourremote
Re:OnServerEvent:Connect(function(Parameters)
– color stuff
return stuff
end)

This acts as a function so can return a value and run with parameters. Check out the API on remote events for more detail and better information.

1 Like