I've tried this:
if game.Players.LocalPlayer.Character.Humanoid.RigType == "R6" then
print("Player is an R6")
end
But it just doesn't work.... I tested it on myself and I am indeed R6.
I've tried this:
if game.Players.LocalPlayer.Character.Humanoid.RigType == "R6" then
print("Player is an R6")
end
But it just doesn't work.... I tested it on myself and I am indeed R6.
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
repeat
wait()
until Character:FindFirstChildOfClass("Humanoid")
local Humanoid = Character:FindFirstChildOfClass("Humanoid")
if Humanoid.RigType.Value == 0 then
-- Humanoid RigType is R6
elseif Humanoid.RigType.Value == 1 then
-- Humanoid RigType is R15
end
This is probably the best way.
Try this:
if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
print("Player is an R6")
end
Enums should work better.
if game.Players.LocalPlayer.Character.Humanoid.RigType == Enum.HumanoidRigType.R6 then
print("Player is an R6")
end
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
-1 for reinventing the wheel for no reason and for unnecessarily comparing the Value of the RigType. Just check the enum! It is more explicit that way!
I have tried with the EnumItem but for some reason it runs into an error on my side, so I made the edit to this comment. I do understand though. Thank you for replying.
Another thing to state is that it is a lot faster to type and some people depend on the time of that to get their work done. Some things just have to be done a different way.