dentify what kind of datatype is something and reverse it again to string.
local Obj = Vector3.new() local Obj2 = game.Players.LocalPlayer if FunctionToIdentifyDatatype(Obj) == "Vector3" then print("Vector3.new("..Obj.X..","..Obj.Y..","..Obj.Z..")") end if FunctionToIdentifyDatatype(Obj2) == "Instance" then print("game."..Obj2:GetFullName()) end --Output --Vector3.new(0,0,0) --game.Players.UserName