hey, struggling to find one since my older one script doesnt work

group = 2974178
rank = 2
bc = BrickColor.new("Black")

function Click(mouse) 
if script.Parent.Parent.Parent.Parent.Parent:GetRankInGroup(group) >= rank then 
script.Parent.Parent.Parent.Parent.Parent.TeamColor = bc
end 
end 

script.Parent.MouseButton1Click:connect(Click)
``

without FE its works fine

Also dont try linking me to websites since I have tried everything.