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

Argument 1 missing or nil?

Asked by 10 years ago

How would I fix this error I got in the output? Please show how you managed to fix it.

Output:

Argument 1 missing or nil

DistanceGetter = coroutine.wrap(function()  
    while wait() do
    for _,Player in pairs (game.Players:GetChildren()) do
-------------------------------------------------------
        local Part = script.Parent
        local Character = Player.Character
        local Distance = (Character.Torso.Position - Part.Position).magnitude
        local HasGui = false
        ------------------------------------------------------- 
        print(Distance)
            if Distance < 4 then
                for _,Guis in pairs (Part.GuiFolder:GetChildren())do
                    CopiedGuis = Guis:Clone()
                        CopiedGuis.Parent = Player.PlayerGui
            FoundCopyGuis = Player.PlayerGui:FindFirstChild(CopiedGui)
                if FoundCopyGuis then
                    print("This player has all guis")






    end
        end
            end
                end
                    end
                        end)
DistanceGetter()



Answer this question