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)

5 comments

0

This is because you're editing the image in the StarterGui Instead, Use Player.PlayerGui.[ScreenGui name]['Imagename'].ImageTransparency

0

Actually, that does the same thing.

0

The script is in the GUI so it is locating the image from inside the GUI so that can't be the problem

0

Because you're using a SERVER script, use a LOCAL script. Always use these for guis.

0

Absolute face palm, I haven't played roblox in a month so i guess thats what i get.