It kills me yet I am in the group and am higher then rank 2. Why? Console has 0 errors
script.Parent.Touched:connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") ~= nil then local Player = game.Players:GetPlayerFromCharacter(hit.Parent) if Player then if Player:GetRankInGroup(2758901) == 2 then print("Good") else hit.Parent.Torso:Remove() -- Moved the check for humanoid up. end end end end)
You are not checking for anything above rank 2!
When the code asks if Value1 == Value2
, the ==
operator only checks if the value is equal to 2. Not if its equal to 2 or above 2.
Instead, try using the >=
operator as it checks for a number or anthing above it.
Hopefully this helped ^^