Frame Transparency Dosen't Goes Down

Hey Guys, Can Ya Help Me With This? The Problem Is: That I Created An Script To Lower Background Transparency Of A Frame, Its Background Transparency Actually Goes Down But The Frame Stays As If It Din’t

	for i = 100,0,-1 do
		wait(1)
		Sanity.Value = i
		if Sanity.Value == 0 then
			player:Kick("Your Sanity Was Too Low, You Slowly Became Insane And Died..")
		end
		local RedGui = game.StarterGui.RedFrameGui.Frame
		if Sanity.Value == 80 then
			if RedGui.BackgroundTransparency == 1 then
				RedGui.BackgroundTransparency = 0.95
			end
		end
	end
end)


above is the script on a local script

You’re editing the StarterGui instead of PlayerGui, whenever a player joins the game, the StarterGui gets cloned to their PlayerGui (their side of the screen/uis.)

You have to replace:

game.StarterGui 

to

game.Players.LocalPlayer.PlayerGui

This way you’re editing the Player’s UI instead of just the StarterGui.

Let me know how it goes. :slightly_smiling_face: