From f8608214985c1d14dd81d21298cb92e85216c74f Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Wed, 25 Oct 2023 11:14:08 +0200 Subject: [PATCH] Use GetDebugId in custom instance properties test --- tests/roblox/instance/custom/properties.luau | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/roblox/instance/custom/properties.luau b/tests/roblox/instance/custom/properties.luau index 01ad508..0fbb694 100644 --- a/tests/roblox/instance/custom/properties.luau +++ b/tests/roblox/instance/custom/properties.luau @@ -36,13 +36,12 @@ local _ = part.PassingPartTest local counters = {} roblox.implementProperty("Instance", "Counter", function(instance) - -- FIXME: Instances do not make for unique table keys for some reason ... - local value = counters[tostring(instance)] or 0 + local value = counters[instance:GetDebugId()] or 0 value += 1 - counters[tostring(instance)] = value + counters[instance:GetDebugId()] = value return value end, function(instance, value) - counters[tostring(instance)] = value + counters[instance:GetDebugId()] = value end) assert(inst.Counter == 1, "implementProperty callback should return proper values")