Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Make it so when your mouse gets removed it removes the gui?

Asked by 5 years ago
Edited by User#24403 5 years ago

I need it to remove the gui from the brick when the mouse is removed. Any help?

player = game.Players.LocalPlayer
mouse = player:GetMouse()

mouse.Move:connect(function()
    if mouse.Target ~=nil and mouse.Target.Name == 'HoverBrick' then
        script.Parent.Position = UDim2.new(0,mouse.X,0,mouse.Y)
    end
end)
1
Here are some tips: 1. Please don't use global variables, put Local before the 'player =' and 'mouse ='. And please use formatting for the script so it's easier for us. mudathir2007 157 — 5y
0
There is a property in mouse called "Icon". This is what makes the mouse visible. This is like an asset value. Like the ones in Decal.Texture SoftlockedUnderZero 668 — 5y

Answer this question