Tween script isnt wokring

So i created a fade in script that runs for once and then ends. Its played when a certain part is touched. I tried my script but the script doesnt show the tween when the part is touched and idk if my script would make a fade in effect. Is there anyway i can fix this and make it fade in?

script:

local Popup = workspace.power ---------------- Change the "Example" to the name of the part the player needs to touch
local Tweens = game:GetService("TweenService")
local Frame = script.Parent.Popupgui2.Frame
local Frame1 = Frame.ScrollingFrame
local Frame2 = Frame.TextLabel
local Frame3 = Frame.ImageLabel
local Frame4 = Frame.TextButton


Popup.Touched:Connect(function(hit)
	if hit.Parent == player.Character then
		local Tween = Tweens:Create(Frame, TweenInfo.new(1, Enum.EasingStyle.Linear), {BackgroundTransparency = 0})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		local Tween1 = Tweens:Create(Frame1, TweenInfo.new(1, Enum.EasingStyle.Linear), {BackgroundTransparency = 0})
		Tween1:Play()
		Tween1.Completed:Wait()
		Tween1:Pause()
		local Tween2 = Tweens:Create(Frame2, TweenInfo.new(1, Enum.EasingStyle.Linear), {BackgroundTransparency = 0})
		Tween2:Play()
		Tween2.Completed:Wait()
		Tween2:Pause()
		local Tween3 = Tweens:Create(Frame3, TweenInfo.new(1, Enum.EasingStyle.Linear), {BackgroundTransparency = 0})
		Tween3:Play()
		Tween3.Completed:Wait()
		Tween3:Pause()
		local Tween4 = Tweens:Create(Frame4, TweenInfo.new(1, Enum.EasingStyle.Linear), {BackgroundTransparency = 0})
		Tween4:Play()
		Tween4.Completed:Wait()
		Tween4:Pause()
	end
end)

A couple things to try:

  1. Check if you want to set transparency to 1, not 0
  2. Add add a debounce so the touch trigger doesn’t fire multiple times:
local touched = false

popup.touched:Connect(function(hit)
if touched then
  return
end
touched = true
<your code>
wait(.01)
touched = false
end


well i want to make it a fade in effect so when you touch the part the gui fades in slowly and stays.
All the gui backgrounds transparency is set to 0

tried it but still didnt work

local Popup = workspace.power ---------------- Change the "Example" to the name of the part the player needs to touch
local Tweens = game:GetService("TweenService")
local Frame = script.Parent.Popupgui2.Frame
local Frame1 = Frame.ScrollingFrame
local Frame2 = Frame.TextLabel
local Frame3 = Frame.ImageLabel
local Frame4 = Frame.TextButton

local touched = false

Popup.touched:Connect(function(hit)
	if touched then
		return
	end
	touched = true
	if hit.Parent == player.Character then
		local Tween = Tweens:Create(Frame, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		local Tween1 = Tweens:Create(Frame1, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0), {BackgroundTransparency = 1})
		Tween1:Play()
		Tween1.Completed:Wait()
		Tween1:Pause()
		local Tween2 = Tweens:Create(Frame2, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0), {BackgroundTransparency = 1})
		Tween2:Play()
		Tween2.Completed:Wait()
		Tween2:Pause()
		local Tween3 = Tweens:Create(Frame3, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0), {BackgroundTransparency = 1})
		Tween3:Play()
		Tween3.Completed:Wait()
		Tween3:Pause()
		local Tween4 = Tweens:Create(Frame4, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0), {BackgroundTransparency = 1})
		Tween4:Play()
		Tween4.Completed:Wait()
		Tween4:Pause()
	end
	wait(.01)
	touched = false

end)

I tried updating the script but it didnt work

local Popup = workspace.power ---------------- Change the "Example" to the name of the part the player needs to touch
local Tweens = game:GetService("TweenService")
local Frame = script.Parent.Popupgui2.Frame
local Frame1 = Frame.ScrollingFrame
local Frame5 = Frame1.TextLabel
local Frame2 = Frame.TextLabel
local Frame3 = Frame.ImageLabel
local Frame4 = Frame.TextButton


Popup.Touched:Connect(function(hit)
	if hit.Parent == player.Character then
		local Tween = Tweens:Create(Frame1, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		script.Parent.Popupgui2.Frame.ScrollingFrame.Visible = true
		local Tween1 = Tweens:Create(Frame2, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		script.Parent.Popupgui2.Frame.TextLabel.Visible = true
		local Tween2 = Tweens:Create(Frame4, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		script.Parent.Popupgui2.Frame.TextButton.Visible = true
		local Tween3 = Tweens:Create(Frame3, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		script.Parent.Popupgui2.Frame.ImageLabel.Visible = true
		local Tween4 = Tweens:Create(Frame, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		script.Parent.Popupgui2.Frame.Visible = true
		local Tween5 = Tweens:Create(Frame5, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, true), {BackgroundTransparency = 1})
		Tween:Play()
		Tween.Completed:Wait()
		Tween:Pause()
		script.Parent.Popupgui2.Frame.ScrollingFrame.TextLabel.Visible = true------------ Change the "Example" To the name of your screen gui
	end
end)

Try printing out after the condition on if hit.Parent == player.Character then then check if it works.