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.
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.
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)
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
wiki is life: http://wiki.roblox.com/index.php?title=How_to_use_a_SelectionBox
MouseHoverEnter? ;)
Wiki is life, Wiki is love ;)