I am not good with scripting but this is what I tried to make.
local rank = 25,255 -- The rank the player will need to get through (out of 255) local groupID = 1139999 -- The group ID the player must be in script.Parent.Touched:connect(function(hit) if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then if (game.Players[hit.Parent.Name]:IsInGroup(groupID) and game.Players[hit.Parent.Name]:GetRankInGroup(groupID) == rank) then else human.Health= 0 end end end)
What I wanted the script to do was Kill someone if they weren't in the right rank.
local rank = 25 -- The rank the player will need to get through (out of 255) local groupID = 1139999 -- The group ID the player must be in script.Parent.Touched:connect(function(hit) if (hit and hit.Parent and game.Players:FindFirstChild(hit.Parent.Name)) then if (game.Players[hit.Parent.Name]:IsInGroup(groupID) and game.Players[hit.Parent.Name]:GetRankInGroup(groupID) >= rank) then --Do nothing else hit.Parent:BreakJoints() end end end)