Returning values for clients

I am currently making a combat game and then sometimes needs the blocking boolean,attacking boolean
i used to use attributes to provide the clients the values but i find that its a bad habit to do so i am using a modulescript(in ServerScriptService) to make a table for these values but i have to use remoteevents to return it
Are there any other ways that i could do it without remoteEvents? Any suggestions

It’s what RemoteFunctions are for.

remoteFunc.OnServerInvoke = function(player)
    return 300
end
print(remoteFunc:InvokeServer()) --> 300
1 Like

You can’t do that without remote events.
Remote events and remote functions are used for server-client communication.
I recommend using remote events because server sided remote functions can literally break your entire game.

Just get the info for when to change your values, fire remote event to server, then do it on the server.

You will need to sanity check to prevent hacking, bad data, etc, but this should work just fine.

Your previous method is also not a bad habit, it’s a good way of solving your problem and one that is commonly used.