function onKeyPress(inputObject, gameProcessedEvent)
if gameProcessedEvent then return end
if inputObject.KeyCode == Enum.KeyCode.Z then
if script.Parent == true then
script.Parent = false
else script.Parent = true
end
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
the script above is supposed to turn the scripts parent(a frame), invisible. when i press z, i get this error:
Players.Player1.PlayerGui.create.inventory.fds:7: bad argument #3 to 'Parent' (Object expected, got boolean)

1 comment
oh my gosh, i am the lord of the dumbos