Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I am a higher rank then that and I get refreshed when I pass how do I fix it? [closed]

Asked by 4 years ago
Edited by evaera 4 years ago

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.

0
please use comment blocks botw_legend 502 — 4y

Closed as Not Constructive by evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?