script.Parent.Touched:connect(function() local brick = script.Parent brick:FindFirstChild("Humanoid") brick.Transparency = .8 brick.CanCollide = false end)
In other words, how do I make it so that this brick is ONLY transparent and not "Cancollided" for him only? Like, if the player touches it, only that specific player would see it transparent and the other players will see the brick, but it won't be transparent and not "cancollided" for them. (So technically, only the person who touched the brick would be able to walk through it.)
I have Filtering Enabled
When Filtering is enabled, changes done by clients won't replicate to the server and therefore to other clients. We can "abuse" this to only apply changes locally.
First, create a RemoteEvent in ReplicatedStorage. Then, place the following LocalScript in StarterGui:
game.ReplicatedStorage:WaitForChild("RemoteEvent").OnClientEvent:connect(function(brick) -- Any changes you want to happen go here brick.Transparency = .8 brick.CanCollide = false end)
Next, create a regular Script inside the brick:
script.Parent.Touched:connect(function(toucher) if not game.Players:GetPlayerFromCharacter(toucher.Parent) then return end -- Only works for players local brick = script.Parent game.ReplicatedStorage:WaitForChild("RemoteEvent"):FireClient(game.Players:GetPlayerFromCharacter(toucher.Parent), brick) -- Assuming you want to apply the changes to the player who touched it end)
And there you go! Any questions about how it works; ask in the comments.