What is the problem with this script?

Hello so I am trying to script a system where it goes through a list of roles which has the correct perms they will get a tool. I am unsure though as it seems not to work.

Script:

game.Players.PlayerAdded:Connect(function(Player)
	print("Player Added")
	local MRID ={255, 44, 55, 25}
	for i, v in pairs(MRID) do
		if Player:GetRankInGroup(6559630) == MRID then
			Player.CharacterAdded:Connect(function(Character)
				local LRBuild = game.ServerStorage.LRF3X
				print("Character Added")
				local ToolClone = LRBuild:Clone()
				ToolClone.Parent = Player.Backpack
				print("Tool added to backpack")
			end)
		end
	end
end)
1 Like

Nvm it was a problem I found out. I put the table in the rank check part not the ranks inside the table which are getting looped through.

3 Likes