I'm making a game where you throw items and fight, but while scripting it, I came across a problem. I made a script so that when you click on an item, a GUI appears, but it won't work. Heres the script:
LampProp = script.Parent
ScreenGui = game.StarterGui:WaitForChild("ScreenGui")
LampFound = ScreenGui:WaitForChild("Lampfound")
function GuiVisibleGuiInvisible()
LampFound.Visible = true
--making the "You found a lamp!" thing visible.
wait(5)
--making the "You found a lamp!" thing invisible.
LampFound.Visible = false
end
--turns the LampFound icon visible and invisible
LampProp.ClickDetector.MouseClick:connect(GuiVisibleGuiInvisible)
**Thanks in advance!

1 comment
Nvm i fixed