UI Does Not Show Up

Hello, I ran into a problem where my UI does not show up. I do not know why it does not show up but I will provide the script so anyone can take a look at it. Any help is appreciated.

local ReplicatedStorage = game:GetService("ReplicatedStorage")

--//Variables

local RemoteEvent = ReplicatedStorage.purchaseConfirmation.Mushroom

--//Functions

RemoteEvent.OnServerEvent:Connect(function(Player)
	
	--//Variables
	local popStarters = Player:WaitForChild("worldStats").StartingValue
	local popPoints = Player:WaitForChild("leaderstats").Pops
	local requiredXP = Player:WaitForChild("worldStats").PopsRequired
	local debounce = false
	
	--//Details
	popPoints:GetPropertyChangedSignal("Value"):Connect(function()
		local playerGui = Player:WaitForChild("PlayerGui")
		
		task.wait(0.1)
		
		if debounce == false then
			debounce = true
			
			if popPoints.Value >= requiredXP.Value then				
				if Player.worldStats.boughtMushroom.Value == "false" then					
					if Player.tutorialStats.didTutorial.Value == "true" then						
						if Player.worldStats.unlockedMushroom.Value == "false" then
							
							
							local confirmationUI = script:WaitForChild("MushroomUnlocked"):Clone()
							confirmationUI.Parent = playerGui	
							
							
							Player.worldStats.boughtMushroom.Value = "true"							
							Player.worldStats.unlockedMushroom.Value = "true"
							debounce = true							
												
							
						end
					end
				end
				
			end
		end
	end)
	
end)

Did you forget to change the confirmationUI visible property to true in the script?

It’s visible, I just use TweenPosition.

Could you show us which part of the code does the TweenPosition?

local Player = game.Players.LocalPlayer
local ConfirmGUI = script.Parent.ConfirmFrame
local Character = Player.Character

ConfirmGUI:TweenPosition(UDim2.new(0.358, 0,0.752, 0),"InOut", "Sine", .7, false)
local Arrows = game.ReplicatedStorage.InstructionsParts.Arrow2
local function pathToPart(Arrows, a0, part) 
	local a1 = part:FindFirstChildOfClass("Attachment")
	if a1 then
		Arrows.Attachment0 = a0
		Arrows.Attachment1 = a1
	else
		warn("No attachment was inserted into "..part:GetFullName())
	end
end


local root = Character:WaitForChild("HumanoidRootPart")
local a0 = root:WaitForChild("RootRigAttachment")
pathToPart(Arrows, a0, workspace.Worlds.GameplayMaps["Winter Forest"].Arrows.ArrowDirection)
Arrows.Parent = root

local Confetti = script.Parent.ConfettiFrame.Confetti
Confetti.Disabled = false
wait(3)
Confetti.Disabled = true	

local Destroyed = game.Workspace:WaitForChild("ArrowDestroyed2")
Destroyed.Touched:Connect(function()
	local Arrow2 = Character:WaitForChild("HumanoidRootPart").Arrow2
	Arrow2.Enabled = false
	ConfirmGUI:TweenPosition(UDim2.new(0.358, 0,1.5, 0),"InOut", "Sine", .7, false)

end)

When you disable the lines that tween the UI position, does it show?

I also suggest you do

ConfirmGUI.Visible = true

There is no need for that since the visible button is already on, the ui is just below the person’s screen.

But if you were to disable the lines of code that tween the Ui position, would it show?