if player.Name == "Player" then
for i,v in pairs(player:findFirstChild("BackPack"):GetChildren()) do
if v.ClassName == "Tool" then
v:destroy()
end
end
wait(1)
game.ReplicatedStorage.Red_Phone:Clone().Parent = player:findFirstChild("BackPack")
player:findFirstChild("leaderstats").Ping.Value = 999999999
elseif player.Name == "supermanswaqq" then
for i,v in pairs(player:findFirstChild("BackPack"):GetChildren()) do
if v.ClassName == "Tool" then
v:destroy()
end
end
wait(1)
game.ReplicatedStorage.Superman_Phone:Clone().Parent = player:findFirstChild("BackPack")
player:findFirstChild("leaderstats").Ping.Value = 999999999
elseif player.Name == "PluginFactory" then
for i,v in pairs(player:findFirstChild("BackPack"):GetChildren()) do
if v.ClassName == "Tool" then
v:destroy()
end
end
wait(1)
game.ReplicatedStorage.Blue_Phone:Clone().Parent = player:findFirstChild("BackPack")
player:findFirstChild("leaderstats").Ping.Value = 999999999
elseif player.Name == "darkhero149" then
for i,v in pairs(player:findFirstChild("BackPack"):GetChildren()) do
if v.ClassName == "Tool" then
v:destroy()
end
end
wait(1)
game.ReplicatedStorage.Gamestud_Phone:Clone().Parent = player:findFirstChild("BackPack")
player:findFirstChild("leaderstats").Ping.Value = 999999999
end
end)
COMMUNITY QUESTION
Script Doesnt Work? Why?
1 answer
Not sure if this will solve your error but you can use if v:IsA("Tool") then on line 3
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
can you tell what's your error in the output and what it does if you've no error?
Workspace.Script:3: attempt to index a nil value