Retrace the player through a changed event

I was wondering if there was any ways to know what value changed between the different players.
I searched on the Dev hub and did not found ways to trace what object change.
In conclusion i want to know wich player got their EXP value changed through the server.

local function Changed(change)
	print()
end

game.Players.PlayerAdded:Connect(function (child)
	wait(3)
	child.PlayerGui.PlayerValues.DataStoreValues.EXP.Changed:Connect(Changed)
end)

for _, player in pairs(game.Players:GetChildren()) do
	player.PlayerGui.PlayerValues.DataStoreValues.EXP:Connect(Changed)
end
1 Like

what prevents you from subscribing to events after creating data in the player

local Players = game:GetService('Players')

Players.PlayerAdded:Connect(function(plr)
  local cash = Instance.new('IntValue', plr)
  
  cash:GetPropertieChangeSignal('Value'):Connect(function()
    print(1)
  end
end)
1 Like

Yes you are right thank you. I actually did not create the instance when the player joins but connected the event and it worked. Thank you again! Did not know you could do that.

game.Players.PlayerAdded:Connect(function (child)
	wait(3)
	child.PlayerGui.PlayerValues.DataStoreValues.EXP.Changed:Connect(function(change)
		print(child.name.." has now "..change.." Exp")
	end)
end)