Why does this simple Image transparency changer script only work in studio?
local Debounce = true
script.Parent.MouseButton1Click:connect(function()
if Debounce == true then Debounce = false
if script.Parent.Parent.PlanetView.ImageTransparency == 0 then
script.Parent.Parent.PlanetView.ImageTransparency = 1
script.Parent.Parent.StatsView.ImageTransparency = 0
else if script.Parent.Parent.PlanetView.ImageTransparency == 1 then
script.Parent.Parent.PlanetView.ImageTransparency = 0
script.Parent.Parent.StatsView.ImageTransparency = 1
end
end
Debounce = true
end
end)