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

BillboardGUI's when hovering over part with mouse?

Asked by 6 years ago

So I want it to be so when I hover over my Door for example with my mouse I want it to show/Enable the Billboard GUI. I am not sure on how I should do this niether I have a any scripts to try with, any help would be awesome! //ItsRickGrimes

0
try a while try do with mouse.Target , if you want me to give you an example in an answer I can abnotaddable 920 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

Put a local script in StarterPlayerScripts (found in StarterPlayer)

local player = script.Parent.Parent
local mouse = player:GetMouse()
local part = workspace.Model.Part --or workspace.Part ,Must be a part (can be in a model just make the part in the model the whole size of the model but invisible)

spawn(function()
    while true do
        if mouse.Target ~= nil then
            if mouse.Target == part then
                part.BillboardGui.Enabled = true
                part.SelectionBox.Visible = true --Only include this line if you have a selection box
            else
                part.BillboardGui.Enabled = false
                part.SelectionBox.Visible = false --Only include this line if you have a selection box
            end
        end
        wait()
    end
end)

Hope this helps!

0
Helped out tons, thanks dude! I only knew how to do this with GUI's before. This really helped, appreciate it ItsRickGrimes 20 — 6y
Ad

Answer this question