You have 2 options:
1- clickdetector
2- playermouse
local userInputService = game:GetService('UserInputService')
local players = game:GetService('Players')
local parts = {
[workspace.Part1] = screengui1; -- associate each part with a screengui
[workspace.Part2] = screengui2;
}
local hoverPart = nil -- part to be assigned if in the parts table
local mouse = players.LocalPlayer:GetMouse() -- get the mouse object
mouse.Move:Connect(function()
if mouse.Target then
if parts[mouse.Target] then -- if a screengui is associate with the target
hoverPart = mouse.Target
else
hoverPart = nil -- otherwise, assign the hoverpart variable to nil
end
end
end)
userInputService.InputBegan:Connect(function(input, isSystemReserved)
if (hoverPart) and (not isSystemReserved) and input.InputType == Enum.InputType.MouseButton1 then
print('Showing',parts[hoverPart])
parts[hoverPart].Enabled = true
end
end)