Hi. I'm making a setrank command for my game but the command isn't working. Anybody know why this is happening? There's no output in console. Here is my script:
server = nil
service = nil
return function()
server.Commands.ExampleCommand = {
Prefix = '!';
Commands = {"setrank", "setgroup", "settag"};
Args = {"arg1"};
Description = "Set group tag.";
Hidden = false;
Fun = false;
AdminLevel = "Players";
Function = function(plr,args)
local plrName = plr.Name
local chr = game.Workspace[plrName]
local secId = 11597600
local mainId = 11597498
local adminId = 11597658
if tostring(args[1]) == 'rt' or 'main' then
chr.Head.Rank.Rank.Text = plr:GetRoleInGroup(mainId)
elseif tostring(args[1]) == 'security' or 'RTST' then
chr.Head.Rank.Rank.Text = plr:GetRoleInGroup(secId)
elseif tostring(args[1]) == 'ad' or 'administration' then
chr.Head.Rank.Rank.Text = plr:GetRoleInGroup(adminId)
end
end
}
end

1 comment
Resolved in dms, was parenting to head incorrectly.