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

How do I make a brick on enter thingy?

Asked by 9 years ago

I am trying to make it so that when a player put their mouse inside of a brick then a Gui will popup that is attached to the mouse.

I know you use Mouse.Target But the wiki didn't teach me anything about it. Send Halp.

0
MouseHoverEnter? ;) JJ_B 250 — 9y
0
Wiki is life, Wiki is love ;) UserOnly20Characters 890 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
local Mouse = game.Players.LocalPlayer:GetMouse()
local Gui   = game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui"):WaitForChild("GuiNameHere")
local Brick = game["Workspace"]:WaitForChild("Brick")

Mouse.Move:connect(function()
if Mouse.Target == Brick then
Gui.Visible = true Gui.Position = UDim2.new(Mouse.X,0,Mouse.Y,0)
--[[
else
Gui.Visible = false
--]]
    end
end)
Ad

Answer this question