so like my last post i am trying to make a game tips and tricks menu where if you walk near a object, it will show a gui. when you touch an invinsible brick, if will show the menu but i want it to close when you are not touching it. here is my script
script.Parent.Touched:Connect(function(hit)
local Player = game:GetService('Players'):GetPlayerFromCharacter(hit.Parent)
if Player then
Player:WaitForChild('PlayerGui'):WaitForChild('Tips').Enabled = true
elseif
player.PlayerGui.Tips.Enabled = false
end
end)

2 comments
check my edit
edited again