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

Is it possible to make something only see-able by the client?

Asked by 5 years ago

I made a script that creates a selection box when the mouse hovers over a part, but when I do server testing the second client can also see this. I tried placing the code in a LocalScript and it didn't even work at that point.

Not sure if you need the code or if this counts as a request.

But here is my code:

script.Parent.ClickDetector.MouseHoverEnter:connect(function(Player)
   local sb = Instance.new("SelectionBox")
    sb.Adornee = script.Parent
    sb.Parent = script.Parent

    script.Parent.ClickDetector.MouseHoverLeave:connect(function(Player)
    sb:Remove()
    end)
end)


0
Use filtering enabled or if you don't want to use that then (hacky method not recommended) parent anything you want to be local to the camera (in a localScript obviously). Griffi0n 315 — 5y
0
I am using filtering enabled, but I had it in a server script before that so that's why I was going to start to parent it into the camera. VeryDarkDev 47 — 5y

Answer this question