I have a simple thing so when a value that is in ReplicatedStorage is set to false, the brick will be CanCollide off and Transparency 1. But when it is set to true, it does the opposite. Here is my code:
local val = game.ReplicatedStorage.IsFalling.Value
local target = game.ReplicatedStorage.IsFalling
target.Changed:connect(function()
warn("Change")
if val == true then
script.Parent.Protection.Transparency = 0.4
script.Parent.Protection.CanCollide = true
elseif val == false then
script.Parent.Protection.Transparency = 1
script.Parent.Protection.CanCollide = false
end end)
It's function is firing, I could tell from the "warn" i put in there. What's wrong with my code?

1 comment
Your code half-fixed my problem, but I did the other half, so i might as well accept the answer :P