How to overcome it?

so what should I do, or is there another way besides using PlayerGui?
image

local Remote =  game:GetService("ReplicatedStorage").FireQuest
local RemoteVisible =  game:GetService("ReplicatedStorage").Visible
local cash = 1000

Remote.OnServerEvent:Connect(function(player)
	if player.Misi.JumpText.Value == 500 then
	 player.leaderstats.Cash.Value = player.leaderstats.Cash.Value + cash
	end
end)

RemoteVisible.OnServerEvent:Connect(function(player)
	while wait() do
     player.PlayerGui.ScreenGui.Frame.Mission1.TextButton.Visible = false
	end
end)

Repeat wait until PlayerGui is loaded

1 Like


This?

RemoteVisible.OnServerEvent:Connect(function(player)
repeat task.wait() until player.PlayerGui ~= nil
	while wait() do
     player.PlayerGui.ScreenGui.Frame.Mission1.TextButton.Visible = false
	end
end)

here is what I meant.

1 Like

Thank you for your help :ok_hand: :ok_hand: :ok_hand:

1 Like