Hi, all! I’m trying to build a restricted team where you have to be in the group, but it isn’t working. Here is my script:
local Players = game:GetService("Players")
local team = game.Teams["TEAM RED"]
local player = Players.LocalPlayer
local gid = script.Parent.SETTINGS.groupID
local minrnk = script.Parent.SETTINGS.minRank
script.Parent.MouseButton1Click:Connect(function()
if player:GetRoleInGroup(gid) >= minrnk then
game.ReplicatedStorage.Change:FireServer(team)
end
end)
Help and support would be greatly appreciated! I’ve asked everywhere and couldn’t find an answer.