cloneref
Returns a fresh reference to an instance that behaves identically but is not equal to the original, so scripts comparing references cannot detect that you hold it.
Signature
cloneref<T>(instance: T & Instance): TParameters
instanceInstanceThe instance to re-reference.
Returns
Instance
Example
local players = game:GetService("Players")
local safe = cloneref(players)
print(safe == players) --> false
print(compareinstances(safe, players)) --> true
print(safe.LocalPlayer.Name)