Is it ok to store custom attributes inside the player object?

Hello
I need a place to store a value related to each player and to update the player UI when this value changes.
Is it ok to create a custom attribute inside the player object and subscribe a function in a local script to its Changed event in order to update the UI?

Thanks

You should be fine to set attributes to the player, I can’t imagine why it wouldn’t be alright.

2 Likes

You can, replicated storage is the conventional way of placing player attributes values.
Edit: just reread for some reason i thought player object meant character, yes player object is the standard place for storing values, not replicated storage, just cam eback after 2 years so forgot a bit

That is the best location for them, they are automatically removed when the player leaves so you don’t need to explicitly remove them your self.

is it easily exploitable im scared of doing it since it might be exploitable for combat like an auto parry kinda thing