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

Can you make certain object invisible/visible to a specific person?

I want to make parts of the character model invisible to one player but visible to all others. Is this possible?

1 answer

✓ Accepted answer

Yes, it is possible, but you'll need to use a localscript in order to do this. Since localscripts are client-sided and normal scripts are server sided, you'll choose the localscript since it will only show for that player

Accessing the player in a localscript

local player = game.Players.LocalPlayer --won't work in server

and now, to get the character, you'll check if their character has loaded yet

local player = game.Players.LocalPlayer --won't work in server
local character = player.CharacterAdded:Wait() or player.Character

now, try to get some parts of the character, and if you don't know the parts of a character, then try using a dummy, and look inside of it

local player = game.Players.LocalPlayer --won't work in server
local character = player.CharacterAdded:Wait() or player.Character

local hrp = character:FindFirstChild("HumanoidRootPart")

and set the visible property to false

local player = game.Players.LocalPlayer --won't work in server
local character = player.CharacterAdded:Wait() or player.Character

local hrp = character:FindFirstChild("HumanoidRootPart")
hrp.Transparency = 1

I hope you got an idea on what to do, and if you're still having trouble with local scripts, then I'll give you this wiki.

3 comments

0

parts dont have a visible property, use transparency = 1

0

Oh right, I am so sorry

0

Thanks for answer. I also found out about LocalTransparencyModifier, with this command you can change the transparency for a specific client. This is a lot easier if you just wanted to make something invisible for one guy because now you don't have to replicate everything you want to client based manipulate onto a local script.

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