I have a gui that appears when you hold down your left mouse button and I'm trying to make it so that if you hover your mouse over a button and let go of the left button, it does something, but it doesn't seem to work for me.
This is the code I'm using right now:
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local GreenEntered = false
Green.MouseEnter:connect(function()
GreenEntered=true
ExpandGreen()
end)
Mouse.Button1Down:connect(function()
if GreenEntered == true then
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed=100
end
end

1 comment
I didn't copy the entire script, but I can put it if you'd like. Also, its hard to detect the clicking of the left mouse button because to open the gui you have to hold down the left mouse button and when you let go the gui disappears.