Absolutely nothing happens. The number value does not change, which is the first part.
p = script.Parent
n = script.Parent.Number
gr = workspace.GreyRim
u1 = workspace.Union1
u2 = workspace.Union2
script.Parent.Touched(function()
if n.Value == 1 then
script.Parent.Script.Disabled = true
n.Value = 0
script.Parent.BrickColor = BrickColor.new("Bright blue")
for index,v in pairs(workspace.Glass:GetChildren()) do
for i = 1,8 do
v.Transparency = .7
v.CanCollide = true
end
end
for i = 1,160 do
p.CFrame = p.CFrame * CFrame.new(0,.135,0)
gr.CFrame = gr.CFrame * CFrame.new(0,.135,0)
u1.CFrame = u1.CFrame * CFrame.new(0,.135,0)
u2.CFrame = u2.CFrame * CFrame.new(0,.135,0)
wait(.05)
end
wait(1)
p.BrickColor = BrickColor.new("Medium blue")
n.Value = 1
for index,v in pairs(workspace.Glass:GetChildren()) do
for i = 1,8 do
v.Transparency = 1
v.CanCollide = false
end
end
wait(5)
script.Parent.Script.Disabled = true
end
if n.Value == 0 then
script.Parent.Script.Disabled = true
n.Value = 1
script.Parent.BrickColor = BrickColor.new("Bright blue")
for index,v in pairs(workspace.Glass:GetChildren()) do
for i = 1,8 do
v.Transparency = .7
v.CanCollide = true
end
end
for i = 1,160 do
p.CFrame = p.CFrame * CFrame.new(0,-.135,0)
gr.CFrame = gr.CFrame * CFrame.new(0,-.135,0)
u1.CFrame = u1.CFrame * CFrame.new(0,-.135,0)
u2.CFrame = u2.CFrame * CFrame.new(0,-.135,0)
wait(.05)
end
wait(1)
p.BrickColor = BrickColor.new("Medium blue")
n.Value = 1
for index,v in pairs(workspace.Glass:GetChildren()) do
for i = 1,8 do
v.Transparency = 1
v.CanCollide = false
end
end
wait(5)
script.Parent.Script.Disabled = true
end
end)

2 comments
Are you sure that the number value is even set to 1 or 0? If not, that's the problem...otherwise, I don't see anything else wrong with this script.
You never connected your function to any event. So nothing will happen