How to make the text change after the blur effect has been disabled

local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local playerEvent = ReplicatedStorage.Events.PlayerEvent
local Blur = game:GetService("Lighting").Blur
local waitingText = game:GetService("StarterGui").WaitingGUI.TextLabel




local function CheckAllPlayersLoaded()
	local playersInGame = 0
	for _, player in pairs(Players:GetPlayers()) do
		if player.CharacterAdded then
			playersInGame = playersInGame + 1
			print("The player who joined the server is:", player.Name)
			task.wait(1)
			print("The amount of players in the lobby are:", playersInGame)
			Blur.Size = 24
			if #Players:GetPlayers() == 1 then
				print("Player has been loaded in")
				task.wait(5)
				Blur.Enabled = false
			else
				print("Player has not been loaded in")
			end
		end
	end
end



local function textChange()
	if Blur.Enabled == false then
		task.wait(1)
		waitingText.Text = "Waiting"
		task.wait(1)
		waitingText.Text = "Waiting.."
		task.wait(1)
		waitingText.Text = "Waiting..."
	end	
end



Players.PlayerAdded:Connect(textChange)



Players.PlayerAdded:Connect(function(player)
	CheckAllPlayersLoaded()
end)

I made this script under serverscriptservice. The rest of the functions work, but the textChange function doesn’t work after the blur has been disabled. How do I fix this?

1 Like

put the textChange function before the CheckAllPlayersLoaded function

then call the TextChange function at the end of the CheckAllPlayersLoaded function

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.