PlayerGui and StarterGui - Differences

So what you can do is in replicated storage add in a remote event called 'Joined and in serverscript servcie add in a normal script then check when the player joins with game.Players.PlayerAdded:Connect(function(player) game.ReplicatedStorage.Joined:FireClient(player) end)

then in a local script in screen gui do


game.ReplicatedStorage.Joined.OnClientEvent:Connect(function()

    local TextLabel = script.Parent.Frame 
	TextLabel.BackgroundTransparency = 1
	TextLabel.Text = "Loading"
	TextLabel.TextScaled = true
	
	task.wait(5)
	
	for index=0.1,1,1 do
		TextLabel.BackgroundTransparency = index
		task.wait(0.01)
	end
	
	task.wait(1.75)
	
	print("Loaded.")
	
	local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
	
	print("Today is " .. days[5])
end)

this should work I think

Worked a bit, but in the Output, it printed an error that destroyed the frame as not fading away in its specific moment:

image

Everything in startergui gets copied into playergui. Startergui is for you to be able to see and then the GUI gets copied in each player so they can individually screw around with it.

1 Like

frames donā€™t have a value of text you need to actually add something called a text label

Okay, so I found the solution to the problemā€¦ I apparently created one local variable that is to parent the frame! I now made a second one based on the frameā€™s TextLabel:

game.ReplicatedStorage.Joined.OnClientEvent:Connect(function()

	local The_Frame = script.Parent.Frame
	local TextLabel = script.Parent.Frame.TextLabel
	TextLabel.BackgroundTransparency = 1
	TextLabel.Text = "Loading"
	TextLabel.TextScaled = true
	TextLabel.TextStrokeTransparency = false
	TextLabel.TextStrokeColor3 = Color3.fromRGB(241, 241, 241)

	wait(10)

	for index=0, 1, 0.1 do
		print(index)
		The_Frame.BackgroundTransparency = index
		
		TextLabel.BackgroundTransparency = index
		TextLabel.TextTransparency = index
		
		if The_Frame.BackgroundTransparency == 1 and TextLabel.BackgroundTransparency == 1 and TextLabel.TextTransparency == 1 then
			print(index .. " completed.")
		end
		wait(0.075)
	end

	wait(1.75)

	print("Loaded.")

	local days = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}

	print("Today is " .. days[5])
end)

(Silly of me not to notice that, XD)

Well, I believe it is safe to say I understood everything I needed! Thanks, @weding3 & @SubtotalAnt8185

I will quickly mark this reply of mine as solved!

1 Like