basically what i wanna do is that when you touch a part, another part gets set to transparent but everyone sees that part as transparent instead of just that player, that's the problem.
This is simple and easy to do.
First create a local script, you can put this script inside anywhere that can work(I'll put it inside StarterPlayerScripts
).
Inside the local script type:
01 | local part -- location of your part in your game. |
02 | local transparent_part -- location of your part you want transparent |
03 |
04 | local Players = game:GetService('Players) |
05 | local plr = Players.LocalPlayer -- our client(player) |
06 |
07 | local transparency = 1 -- the number of transparency you want the part to get |
08 |
09 | part.Touched:Connect( function (hit) |
10 | if hit.Parent:FindFirstChild( 'Humanoid' ) then -- verifies if hit's parent has 'Humanoid' as a children. |
11 | if Players:GetPlayerFromCharacter(hit.Parent) = = plr then -- verifies if the player that touched the part is our client. |
12 | transparent_part.Transparency = transparency -- sets transparency to part |
13 | end |
14 | end |
15 | end ) |
01 | local Players = game:GetService( "Players" ) |
02 |
03 | local Part 1 = workspace.Part 1 |
04 | local Part 2 = workspace.Part 2 |
05 |
06 | Part 1. Touched:Connect( function (Hit) |
07 | local Player = Players:GetPlayerFromCharacter(Hit.Parent) |
08 |
09 | if Player then |
10 | if Player ~ = Players.LocalPlayer then |
11 | -- Someone touched the brick, but not me! |
12 |
13 | Part 2. Transparency = 1 |
14 | end |
15 | end |
16 | end ) |
It's pretty self explanatory, also this is still a LocalScript, I'm just kind of confused on your question