I need this script to make the Gui disappear if the player clicked somewhere other than the certain area.
local Time = 4 script.Parent.MouseButton1Down:connect(function() script.Parent.Selected.Visible = true wait(4) script.Parent.Selected.Visible = false end) script.Parent.MouseButton1Down:connect(function() wait(0.5) --[[I am stuck here. I need a way to tell if the Player clicked somewhere else other than script.Parent.Selected.Click (The name of the thing to click), and still let them click other things.]]--
Im guessing that the gui you were talking about was on line 16 so what I did was I created a debounce so that you couldn't click it multiple times and it would make the gui visible, wait 4 seconds, then make it invisible
local Time = 4 script.Parent.MouseButton1Down:connect(function() script.Parent.Selected.Visible = true end) script.Parent.MouseButton1Down:connect(function() while true do wait(1) if Time == 0 then script.Parent.Selected.Visible = false else wait(1) end end end) local d = true script.Parent.Selected.Click.MouseButton1Down:connect(function() if d==true then d=false script.Parent.Parent.Parent.Load.Assassin.Visible = true wait(4) script.Parent.Parent.Parent.Load.Assassin.Visible = false d=true end end)