I want to make a custom chat command that will only function if the player is above a certain rank in a group. How can I do that?
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?
It would have been great if you at least made an attempt. But what you'd have to do is define the Player, then create a function for when they chat.
-- [[ SERVICES ]] -- Players = game:GetService('Players') -- [[ MAIN SCRIPT ]] -- Players.PlayerAdded:Connect(function(Player) Player.Chatted:Connect(function(Message) if Player:GetRankInGroup(0) >= 1 then -- change 0 to GroupId, change 1 to minimum RankId -- message stuff here end end) end)