Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How do you get a gui shown up on a character screen when they have their mouse hover over the brick?

I could'nt find anything on ROBLOX wiki.

1 answer

This is actually fairly simple.

Using the GetMouse method of a Player (in a LocalScript of course), we can access their Mouse and what it is 'hovering over' as you said.

local Player = Game.Players.LocalPlayer
local Mouse = Player:GetMouse()

Mouse.Move:connect(function()
	if Mouse.Target and Mouse.Target == Workspace.SpecialHoverBrick then
		Player.PlayerGui.ScreenGui.SpecialHoverGui.Visible = true
	elseif Mouse.Target and Mouse.Target ~= Workspace.SpecialHoverBrick then
		Player.PlayerGui.ScreenGui.SpecialHoverGui.Visible = false
	end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.