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

Is client side brick color or decal possible?

I'm not asking anyone to script for me, I just need help understanding if I can make a brick or decal a specific color for that person. Example because I'm explaining it in such a way that it's hard to understand. The game Blacklight: Retribution has two teams (Light blue and Orange). No matter what, you and your allies will always be light blue and the enemy will always be orange (on your screen), even if you're on the other team. I was wondering how an individual would make that possible. [And for the decal team 1 could view it saying "This" with vertical lines but team 2 would be saying "That" with horizontal lines.] I looked around the wiki and SH's search and couldn't find anywhere to even start at (If this is even possible which I think it is).

And since I have to have a script to post this is what I came up with

if game.Players.LocalPlayer.TeamColor ~= "BrightBlue" then
	BrickColor.new(11)
else
	BrickColor.new(106)
end
-- But I have no idea how to make it client side, please help!

(I haven't slept in like 24+ hours so sorry if some things doesn't make sense.)

1 answer

Objects, with values 'Adornee' - Namely SelectionBox, SurfaceGui, BillBoardGui can be placed in a Player's Gui, Adornee set to an Brick, and only That gui, will appear to that Player.

You can do this with Messages/Hints aswell. By placing the Message/Hint in the player's Gui. - So only that message will appear to the player - no one else

For a 'Local Part', you can place inside a player's camera:

-- Local Script --
player = game.Players.LocalPlayer

cam = Workspace.CurrentCamera -- Only accessible through LocalScripts. - returns player's camera.

Instance.new("Part",cam).Position = player.Character.Torso

This is because, a player's Camera is only rendered to THAT player, no one else, not even the server. So it's physics, size, colour etc, is Rendered to YOU, but nobody else.

Test this on a Local (or Play) Server. And you should only see One Part, no matter how many players come in.

1 comment

0

FilteringEnabled is a supported and recommended alternative to local parts (but of course this works too)

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