Why is this not working:

allowed = {"", "", "",""}
group = 6061378
rank = 30
function onHit(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
local passed = false
for i,v in next, allowed do
if hit.Parent.Name == v then
passed = true
end
end
if game.Players:GetPlayerFromCharacter(hit.Parent):GetRankInGroup(group) >= rank then
	passed = true
end
if passed == false then
game.Players:GetPlayerFromCharacter(hit.Parent):LoadCharacter()
end
end
end
script.Parent.Touched:connect(onHit) 

I got it from a tutorial.

1 comment

0

please use comment blocks