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

What is wrong with this local part script?

Asked by
Mystdar 352 Moderation Voter
9 years ago

It is supposed to make a billboard GUI go in a local part that only one player can see, but doesn't work, help? This is a local script in the StarterGui

Player = game.Players.LocalPlayer
Part = game.Workspace.Mouse_over

function Enter(Player)
    print("Oh my... " .. Player.Name .. " hovered over my parent")
    a   = game.Lighting.BillboardGui:Clone()
    a.Parent  = Player.PlayerGui
    a.Adornee = Part

end

Part.ClickDetector.MouseHoverEnter:connect(Enter)

function Leave(Player)
    print("Oh my... " .. Player.Name .. " left my parent")
    if Player.PlayerGui:FindfirstChild("BillboardGui") then
        Player.PlayerGui.BillboardGui:remove()
    end
end

Part.ClickDetector.MouseHoverEnter:connect(Enter)

The GUI is in the PLayerGui, I just cant see it

0
So it's in a normal script and not a LocalScript? You can only access the camera VIA localscript. Tempestatem 884 — 9y

Answer this question