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 other players invisible?

how do i make other players invisible and the same for every other player? im not sure how to find every player except the person who is going to be visible.

basically i want something that will make a use visible but other players invisible and the same for every player

1 answer

✓ Accepted answer
local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(Player) 
	Player.CharacterAdded:Connect(function(Character)
		for _,Player in pairs(game.Players:GetPlayers()) 
			local Character = Player.Character
			if (Player.Character ~= Character) then
				local CharacterStuff = Character:GetDescendants()
				for _,BodyPart in pairs(CharacterStuff) do
					if (BodyPart:IsA("BasePart") then
						BodyPart.Transparency = 1
					end
				end
			end
		end
	end)
end)

Hope this helps!

2 comments

0

This will enable the Local Character to remain visible, but all others hidden. You'll have to tweak the code @Fr0stPh3noix, but this is what you're looking for in general.

0

thank you so much :)

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