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

Script is detecting an object in GUI that isn't there?

Asked by
niroqeo 123
4 years ago

I'm making a computer screen and when you click it, it will give you the camera gui. But when you exit, and try again, the script detects that it's still there even though it isn't.

script.Parent.ClickDetector.MouseClick:Connect(function(plr)
    for i,v in pairs(game.Players:GetDescendants()) do
        if v.Name == "CameraGui" then print(":(") return end
    end
    local clone = game.ReplicatedStorage.CameraGui:Clone()
    clone.Parent = plr.PlayerGui
end)
0
do u change the visibility of it or delete the gui HappyTimIsHim 652 — 4y
0
I delete it. niroqeo 123 — 4y

Answer this question