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

How do i make an object visible only to yourself?

I would simply like to know how to make a object (for example a selection box) only visible to the player and no one else. I know how to place through a tool a selection box in a player but i would like to know how to make it visible only to the player.

Thanks

1 comment

0

Enable FE and create the object on the client(In a local script).

1 answer

✓ Accepted answer

SelectionBoxes have a property called Adornee. This property allows you to set what the box is adorned to. By parenting the SelectionBox to the player's PlayerGui, and setting its adornee to whatever you're trying to adorn it to, you can make it so only that player sees it.

Here's a snippet for you (modified from the wiki):

local selection = Instance.new("SelectionBox")
selection.Color3 = Color3.new(0.6,0.6,0.6)
selection.Parent = player.PlayerGui
selection.Adornee = workspace.Part

And that's all it takes. However, local parts[^1] don't work like that; if you want to do this with more than just SelectionBoxes, I recommend you read up on it.

Hope this helped.

[^1]: I'm not a big fan of this wiki page; in my opinion, if you want local parts you should just use FilteringEnabled and create the part on the client, instead of relying on hacky & unsupported techniques.

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