I need to make a script that makes a SelectionBox invisible to a specific player, and visible to all the other players. I'm assuming I have to place the selection box in all of the player's cameras. Though I'm not exactly sure on how to go about this.
Here's what I'm using now, when a player enter's it creates a selectionbox places it in the Player's CurrentCamera, and set's the Adornee to The Player's torso. This makes it visible to the local player, and invisible to everyone else. Basically I need to do the opposite. Though I'm having trouble figuring that out.
This is a Local script in the StarterGui
local Player = game.Players.LocalPlayer
repeat wait() until Player.Character
wait()
local box = Instance.new("SelectionBox", game.Workspace.CurrentCamera)
box.Color = Player.TeamColor
box.Adornee = Player.Character:WaitForChild("Torso")
Player.Character.Humanoid.Died:connect(function(Death)
game.Workspace.CurrentCamera:FindFirstChild("SelectionBox"):Destroy()
end)

1 comment
Put the SelectionBox in the player's PlayerGui, not their Camera. A SelectionBox is just a GuiObject.