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

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

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

1 answer

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)

1 comment

0

Yes I used the GetMouse Method. But where do I get the text?

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