local debounce = true
game:GetService("ReplicatedStorage").FadeTouched.OnServerEvent:Connect(function(plr,v)
if debounce then
debounce = false
while v.Transparency <= 1 do
v.Transparency = v.Transparency + 0.01
wait(0.01)
end
v.CanCollide = false
wait(3)
v.CanCollide = true
v.Transparency = 0
debounce = true
end
end)
This is the server event function, it doesn't run the code in the function.
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
game.ReplicatedStorage.FadeTouched:FireClient(player,script.Parent)
end
end)
This is the part that activates the event only to the client, so it fades locally.

4 comments
so the top code is a LocalScript?
No, its a serverscript
So I'm kind of confused... What are you actually trying to accomplish?
I'm trying to make the brick fade locally using fireclient() function