Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[Error] Why would this be erroring?

Like I dont understand why this is erroring it shouldnt be. PLR (attempt to call a nil value 'Plr')

function TH(Txt,Func)
for _,v in pairs(game.Players:GetPlayers()) do
if GetRanking(v)>5 then
Tablet(v,Txt,function()
Func=Func
Func()
end)
end
end
end


Cmd(0,'Get Ranked Up','GR','GetRanked From A High Ranking Player(System)','<returns Service value>',function(Owner)
Tablet(Owner,'Ask A Admin-Creater For A Rank',function()
TH(Owner.Name..' Asks For A Rank Up (Click To Rank)',function(Plr)
for i=0,6,1 do
Tablet(Owner,'Rank '..i,function() 
table.insert(V3.GRanks,{NAME=Owner.Name,RANK=i,COLOR='White',CHAT=true,TTab=false;})
Tablet(Owner,Plr.Name..' Has Ranked You '..i,function() end)
Tablet(Owner,'Say thank you to '..Plr.Name..'?',function() 
Tablet(Owner,Owner.Name..' Says Thank You For The Rank',function() end)
end)
end)
end
end)
end)

1 comment

0

Can you include the full error message, verbatim? What does TH do? What is the PLR parameter? A Character object? Using pcall is definitely not the right answer when you're running into a bug. Fix the underlying problem instead.

1 answer

✓ Accepted answer

It might be because pcall() isn't made to handle yielding, so :WaitFirstChild() did nothing.

This discussion is preserved as it was. New answers, comments, and votes are closed.