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
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 parts1 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.
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. ↩