Help with a script that isn't working [SOLVED]

I’ve written a script in a part that is meant to change the text transparency but I do not understand why this script isn’t working. I’ve looked over it for spelling errors and in the output but nothing seems wrong with it.

local TweenService = game:GetService("TweenService")
local Text = script.Parent.Parent.Parent.StarterGui.ScreenGui.Frame.Text1





script.Parent.Touched:Connect(function()

local InandOutInfo = TweenInfo.new(
	1.5,
	Enum.EasingStyle.Linear
)	
		
local InGoal = {}
	Text.TextTransparency = 0
	
local OutGoal = {}
	Text.TextTransparency = 1			
				
						
local TextInTween = TweenService:Create(Text, InandOutInfo, InGoal)
local TextOutTween = TweenService:Create(Text, InandOutInfo, OutGoal)
	

print("Waiting For Ball Event to end.")
	wait(32)
print("Text Event Starting.")
	
Text.Text = "Test"
TextInTween:Play()
wait(2)
TextOutTween:Play()	
	
	
end)``

You’re changing the text in StarterGui. When a player joins the game, everything is StarterGui is replicated to that players’ PlayerGui. To see results, you thus need to change any properties in PlayerGui rather than StarterGui. It’s as simple as changing the Text variable to

player.PlayerGui.ScreenGui.Frame.Text1

player should be defined as game.Players.LocalPlayer

4 Likes