How could I check all Value's of all player's ObjectValue's?

Basically the title:

How could I check all Value’s of all player’s ObjectValue’s?

The request is pretty vague, so I’m not sure what the specifics are of what you’re trying to achieve.

To iterate over all players, you can use something like:

	for i,v in pairs(game.Players:GetPlayers()) do
		...
	end

Assuming you’ve got an ObjectValue stored in each player:

	for i,v in pairs(game.Players:GetPlayers()) do
		local value = v.ObjectValue.Value -- e.g. Polyheximal.ObjectValue with v being the player
	end
2 Likes

if the object value wasn’t in the player, how would I make its value nil when the player leaves the game?

Depends how you’re connecting the ObjectValue to the player. You can use the PlayerRemoving event to trigger something when a player leaves the game. But as I said above, how you go about this largely depends on how you are linking that specific ObjectValue to a specific player (or whatever use case you have).