How to change
if msg:lower():sub(1,5) == "give " and plr:GetRankInGroup(2788849) >= 7 then
into a team command? This is for a hotel that will give a tool to someone. I only put the part I need help with.
You can use :GetPlayers()
.
local plr = --Edit this variable somewhere in your script so I know the player we are looking for. if msg:lower():sub(1,5) == "give " and plr:GetRankInGroup(2788849) >= 7 then local found = false --This basically turns true if the player is found. for i, v in pairs(game:GetService('Teams')['Insert team name here']:GetPlayers()) do if v.Name == plr.Name then found = true break end end if found then --insert the rest of your script here end end