Here is the local script just in case it has anything to do with the problem:

RNotice = script.Parent.RNotice
RNotice.Position = UDim2.new(0.5, -150,1, 25)

if not _G.Appeared then
	_G.Appeared = true
	game.StarterGui:SetCoreGuiEnabled("Backpack", false)
	game.StarterGui:SetCoreGuiEnabled("Health", false)
	RNotice.Visible = true
	wait(.2)
	RNotice:TweenPosition(UDim2.new(0.5, -150, 1, -70),"Out","Elastic",0.8)
elseif _G.Appeared then
	RNotice.Position = UDim2.new(0.5, -150,1, 25)
	RNotice.Visible = false
	game.StarterGui:SetCoreGuiEnabled("Backpack", true)
	game.StarterGui:SetCoreGuiEnabled("Health", true)
end

Debounce = false
RNotice.IconCloseButton.MouseButton1Down:connect(function()
	if Debounce == false then
		Debounce = true
		if not _G.O then
			_G.O = true
			_G.Appeared = true
			RNotice:TweenPosition(UDim2.new(0.5, -150, 1, 25),"Out","Quad",0.15)
			wait(.5)
			game.StarterGui:SetCoreGuiEnabled("Backpack", true)
			game.StarterGui:SetCoreGuiEnabled("Health", true)
		end
	end
end)

function AutoClose()
	local Current = 10
	for i=Current,1,-1 do
		RNotice.TitleLabel.Time.Text = "(" ..i.. ")"
		wait(1)
	end
	RNotice:TweenPosition(UDim2.new(0.5, -150, 1, 25),"Out","Quad",0.15)
	game.StarterGui:SetCoreGuiEnabled("Backpack", true)
	game.StarterGui:SetCoreGuiEnabled("Health", true)
end
spawn(AutoClose)

2 comments

0

Your best bet is to instead of building the script via code, as that can be unrelyable sometimes, and hard to read is to make it, and then clone it, this can be done by making it, and moving it someone in the datamodel to be cloned into the parent, in this case which is the playergui, also, anything made in startergui will not show up in game, that is useful for core GUI's, this type of script nee

0

When defining the global variables, are they defined in server scripts? If so, that's your problem, clients and the server do not share globals, you're better off using another method of getting the same value on both sides such as a BoolValue object in Workspace or Lighting.