player = script.Parent.Parent.Parent
gui = player.PlayerGui.Game
inv = {gui.Coins, gui.Help1, gui.Help2, gui.Help3, gui.Help4, gui.Leave, gui.Cover, gui.Branches, gui.Fairflyes}
function onSelected(mouse)
for i = 1, #inv do inv[i].Visible = true end
end
function onDeselected(mouse)
for i = 1, #inv do inv[i].Visible = true end
end
script.Parent.Selected:connect(onSelected) -- Selected comes with a mouse.
script.Parent.Deselected:connect(onDeselected)
This shows all gui only once. Also, the script dont hide guis on tool disselect. After tool stops working. How do i fix it? |