Ad
Log in to vote
0

Help on importing player's avatar into the game only visible to that character?

Asked by 2 months ago

I have a crucial part in my roblox horror game where the player see him/herself lying dead on the floor but due to the way the game is structured i need this to be only visible to that specific player so that if another player (say player b) is next to him, they would not see player a 's avatar, they would see theres (player b's) if that makes sense. whether this event is triggered by touching a part or by the player spawning into the game doesnt really matter. Any help with this would be greatly appreciated.

2 answers

Log in to vote
1
Answered by 2 months ago

Well there are several ways to do this, but one way to do it is to make a local script specifically a local script that will turn the avatar transparent except for the actually person, the reason this works is because since Roblox automatically has filtering enabled, if something that affects the server is done by a local script it will only be shown on the client on which the local script is running on, hopefully that helps!.

1
oh ok yeah that helps a lot, thanks TheBlurryKnight 10 — 2mo
Ad
Log in to vote
0
Answered by
sayer80 437 Moderation Voter
2 months ago

Make a ServerScript that makes the dead player invisible every part and accessory transparency = 1 and put a LocalScript into starterplayerscripts or startercharacterscripts:

You register game.Players.LocalPlayer.CharacterAdded Then you for example get the head and when the transparency changes and it is 0 then you automatically put the transparency to 0 or 0.5 if you want them to be a ghost and dont forget humanoidrootpart has to be invisible and if accessories dont turn invisible you just have to check if the parts are accessories and then get the parts inside it and turn them visible

0
like Head.Changed and check transparenyc sayer80 437 — 2mo
1
yea that makes sense, this worked perfectly thanks! TheBlurryKnight 10 — 2mo

Answer this question