Help? Trying to disable inventory for a 5 seconds then re-enabling it

Heres the code.

l ocal startergui = game:GetService(‘StarterGui’)

startergui:SetCoreGuiEnabled (Enum.CoreGuiType.Backpack,false)

wait (5)

startergui:SetCoreGuiEnabled (Enum.CoreGuiType.Backpack,true)

It didn’t work for some reason, does anyone know how to fix it?

There’s spaces between those words. Remove it. Tell us the error as well.

Spaces between what? wait (5)? or startergui:SetCoreGuiEnabled (Enum.CoreGuiType.Backpack,true)

local startergui = game:GetService(‘StarterGui’)

startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)

wait(5)

startergui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)

Ugh let me just help you.

1 Like