Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Group command into Team command. Can I have help?

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.

2 comments

0

So what is the problem you ran into?

0

Yeah.. I don't understand what you mean here. What is a "team command"?

1 answer

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

2 comments

0

local plr = --Edit this variable somewhere in your script so I know the player we are looking for. Am looking for the player that chatted it.

0

explain_your_code

This discussion is preserved as it was. New answers, comments, and votes are closed.