Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

there's a function to identify the type of datatype?[Solved]

Asked by 5 years ago
Edited 5 years ago

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

0
Yes, you can use typof. User#25115 0 — 5y
0
If this helps, please put [SOLVED] in the title of your question, so that people know you no longer need help. User#25115 0 — 5y

Answer this question