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

How would you fix this?

Asked by 8 years ago
        function onClicked()
                check = game.Players:FindFirstChild(name.Text)
                if check then
                    nominee1 = check
                end
                nominee1 = check
                check2 = game.Players:FindFirstChild(name2.Text)
                if check2 then
                    nominee2 = check2
                end
                game.Players.Player.PlayerGui.GUI:Destroy()
            end
        nominateclone.MouseButton1Click:connect(onClicked)

Whenever i try to call nominee1, or nominee2, outside of the function it would say "attempt to index global nominee1." How would I make it so that I can call it anywhere outside of the function

0
What are you trying to accomplish with this? What kind of script is this? Where is the script located? BlueTaslem 18071 — 8y

Answer this question