How to make one person see something and the others can’t

Hi. I am trying to make one person see something and the others can’t, for example the local player would have their body’s transparency to 0 and the others’ would be 0.4. How would I be able to do this?

2 Likes

u could try to create a part with a local script

1 Like

this would be possible using filtering enabled, making a part appear from the client, and since with filtering enabled on, the client that made the part appear would be the only person to see it

for example

–game.Workspace:WaitForChild(game.Players.LocalPlayer.Name).Uppertorso.Transparency = ‘0’

–for i,v in pairs(game.Workspace:GetChildren())
–if v:IsA(“Model”) and v:FindFirstChild(“Humanoid”) then
–v.UpperTorso.Transparency = ‘0.4’
–end
–end

something like that, of course you can change it a bit to your likings

1 Like

example :

local part = Instance.new(“Part”)
part.Name = “MyBlock”
part.Parent = workspace
part.Position = 0,0,0,0

1 Like

You can just use a remote event and fire it on client and do your stuff at client. Simple.

2 Likes

Quite simple actually, use a local script for this.

Local scripts only work for the client the code runs on, so it has no interaction with the server at all, unless you start using remote events/functions.

In your case you could probably just do this;

Add a LocalScript to ‘game. StarterPlayer.PlayerScripts’

Now there are many ways to handle this, I would probably go for something like this:

local Local_Player = game.Players.LocalPlayer

function OnCharacterAdded(character) 
     local torso = character:WaitForChild("UpperTorso") -- or "Torso" if you're still using R6
     torso.Transparency = 0.4
end

function OnPlayerAdded(player) 
     if player ~= Local_Player then
        player.CharacterAdded:Connect(OnCharacterAdded)
     end
end

game.Players:ChildAdded:Connect(OnPlayerAdded)

Apologies for the bad format, was actually about to sleep when I saw this pop up on my phone.

4 Likes

how do i make lines of script? i tried and mine looks like normal text lol, sorry

This is what it looks like. The script text.    

You would click the </> button on the top bar on the post window, (That is if you are on computer) and paste/type your code.

Use the tilde button ` on your keyboard at the start and end of a line for a single line format, for a multiple line format you’d need three tildes at the start and end

1 Like

Back To The Question You Had Before. Here is a tutorial on Local Parts AlvinBlox has made:

Local parts are parts basically only one player is able to see, you can use them to give others advantages or for special hunting mini games to have people seek for things which might give them treats. The point of these though are to only show up for one player using the client to do this, which is why they are called local parts.

sorry meant to reply separately, not to you individually LukeBLOXDaily

1 Like