Credit sequence GUI not working, no errors in the output, need help with tweens

Hello!

I’m a beginner and not very knowledgeable in Roblox scripting, so of course I’ve run into another problem with a script without any errors in the output or pointers for what I need to fix. I’ve looked all over, but couldn’t find any solutions. So here I am.

Basically, for some context:
I’m working on a singleplayer game where you play as a self-aware NPC that found themselves in a post-death purgatory for NPCs. The game starts with your character being very surprised that they’re suddenly conscious and able to think for themselves, and they realize they need to find a way out of the purgatory. After their shock is over, an invisible wall preventing the player from proceeding will lose collision, allowing them to walk through and start the game. Once this happens, a RemoteEvent located in the ReplicatedStorage called “IntroStart” is fired for the client, and then a localscript inside a credits GUI will activate once it recognizes this, and then it’ll tween the transparency of the text and UIstroke inside of it multiple times, as well as changing the text. The code looks like this:

local rs = game.ReplicatedStorage
local ts = game.TweenService

local text = script.Parent.TextLabel
local stroke = text.UIStroke

text.Transparency = 1
stroke.Transparency = 1


rs:WaitForChild("IntroStart").OnClientEvent:Connect(function()
	
	wait(10)
	--Developed/Written
	text.Text = [[Developed and Written
	by Murky]]
	local tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0})
	tweentext:Play()
	local tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0.65})
	tweenstroke:Play()
	wait(5)
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweenstroke:Play()
	wait(5)
	
	--Music Sourced
	text.Text = [[Music sourced from
	the Roblox Library]]
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0.65})
	tweenstroke:Play()
	wait(5)
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweenstroke:Play()
	wait(5)
	
	--An Experience
	text.Text = [[23
	An experience]]
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0.65})
	tweenstroke:Play()
	wait(5)
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweenstroke:Play()
	wait(5)
	
end)

Now I know it’s messy, a bit hard to read, and probably an inefficient solution, but I’m just trying to create something that works for now. As far as I can tell, there’s no reason for this code not to work.

For some more context, I’ll show some explorer screenshots and what the serverscript that executes the remote event looks like - I’m sure you can tell which is which.


image

Any and all help is seriously appreciated, cause I’ve been stumped on this since yesterday. Thank you!

Is the StartGame function ever called?

Yes, the StartGame function is called once the player presses play in the main menu. Everything in the game works fine except for the credits sequence. Sorry if I forgot to clarify that.

Try this:

local rs = game:GetService("ReplicatedStorage")
local ts = game:GetService("TweenService")

local parent  = script.Parent

local text = parent:WaitForChild("TextLabel")
local stroke = parent:WaitForChild("UIStroke")

text.Transparency = 1
stroke.Transparency = 1


rs:WaitForChild("IntroStart").OnClientEvent:Connect(function()
	
	wait(10)
	--Developed/Written
	text.Text = [[Developed and Written
	by Murky]]
	local tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0})
	tweentext:Play()
	local tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0.65})
	tweenstroke:Play()
	wait(5)
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweenstroke:Play()
	wait(5)
	
	--Music Sourced
	text.Text = [[Music sourced from
	the Roblox Library]]
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0.65})
	tweenstroke:Play()
	wait(5)
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweenstroke:Play()
	wait(5)
	
	--An Experience
	text.Text = [[23
	An experience]]
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 0.65})
	tweenstroke:Play()
	wait(5)
	tweentext = ts:Create(text,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweentext:Play()
	tweenstroke = ts:Create(stroke,TweenInfo.new(3,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{Transparency = 1})
	tweenstroke:Play()
	wait(5)
	
end)

Just replaced it. I probably should’ve used :WaitForChild() to begin with since its good practice, but unfortunately it resulted in the same thing this time.

So, I added a :print() statement after every single line in the localscript to ensure it was working. Not a single one of them appeared in the output.

The problem has something to do with the remote event, but I followed the exact same procedure as I did for the main menu and other working events in my game. I don’t know what’s wrong, so please, if anyone knows, any help is appreciated. Tweening text in a GUI was supposed to be easy, right? Apparently not!