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

When someone hovers over the brick for it to say something, how do I add text?

Asked by 10 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I did the GetMouse Method and didn't find anything else.

1 answer

Log in to vote
-1
Answered by 10 years ago

You could add a gui to it using the GetMouse method of a Player (in a LocalScript of course), we can access their Mouse and what it is 'hovering over'.

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)
0
Yes I used the GetMouse Method. But where do I get the text? blackstaro51 -2 — 10y
Ad

Answer this question