Hello, Everyone.
I am creating an Admin Commands system, which reads a command’s arguments (value types) and converts the arguments inputted by the player into their corresponding values.
Everything is working fine, until I tried to implement a Player value.
args = {"!Player"}, -- Ignore "!", this is automatically removed
When using the typeof() function, which is used to check whether the converted value matches correctly, It returns "Instance"
, not "Player"
, which strangely enough, is said to be “Player” in the code hint:
I’m unsure on what to do. As “userdata” or “Instance” doesn’t roll off the tongue that well and makes for some hacky solutions. I also don’t know whether this is intended behavior or not, so I’d like your input in case it is a bug.
This is the code I used, for clarity:
local service = game:GetService("Players")
service.PlayerAdded:Connect(function(player)
print(typeof(player))
end)