It's not letting me show gui after a player gets a score of 3

local check = game.ServerStorage:WaitForChild(“BillboardGui”):Clone()
clone = game.ServerStorage:FindFirstChild(“BillboardGui”):Clone()

game:GetService(“Players”).PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(Character)

	local statss = player:FindFirstChild("leaderstats")
	local spree2 = statss.Spree.Value







	local spree = statss.Spree
	


	local clonedgui = clone




	clonedgui.Parent = Character.Head
	
	clonedgui.SpreeTag.TextTransparency = 1





		if spree.Value >= 3 or spree.Value == 3 then 
			
			
			
			
			
	
			
			
	
	
			
			
			
			
			clonedgui.SpreeTag.Text = "☠️Spree|".. spree.Value
			clonedgui.SpreeTag.TextColor3 = Color3.fromRGB(231,206,12)

			clonedgui.SpreeTag.TextTransparency = 0
			
				
					
					 
					
				
					
					
	end
end)
end)

code works right. i’m running into an issue now where if player gets spree of 3 it won’t make transparency 0? so the gui will show up once player gets the 3 spree.

First of all I just wanted to say the formatting of the code is bad, not sure why you got so many spaced.

Secondly you can’t just state “clone” and expect it to clone something. You would need to find where the UI is stored (find the UI) and then do :Clone(). Thats how cloneing works cuz it needs to know what to clone first.

Third you can’t have a number inside the variable name as stated inside the article (Variables (roblox.com)

Fouth not a major issue but you spelt stats incorrectly (it is with one s not two). Could just confuse someone looking at the code.

Overall not very nice code at all no offense.

Clone what? You have to specify like “Frame:Clone()” first of all

I also want to say that you should probably remove some spaces, that code is not written very well.

Try this

local check = game.ServerStorage:WaitForChild(“BillboardGui”):Clone()

game:GetService(“Players”).PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(Character)
		local statss = player:FindFirstChild("leaderstats")
		local spree2 = statss.Spree.Value
		local spree = statss.Spree

		local clonedgui = game.ServerStorage:FindFirstChild(“BillboardGui”):Clone()
		clonedgui.Parent = Character.Head
		clonedgui.SpreeTag.TextTransparency = 1
		
		local function checkSpree()
			if spree.Value >= 3 or spree.Value == 3 then 
				clonedgui.SpreeTag.Text = "☠️Spree|".. spree.Value
				clonedgui.SpreeTag.TextColor3 = Color3.fromRGB(231,206,12)
				clonedgui.SpreeTag.TextTransparency = 0
			end
		end

		checkSpree()

		spree.Changed:Connect(function()
			checkSpree()
		end)
	end)
end)
1 Like

clone statement was added idk why its not showing you two but i already added the find ui and :clone() but got the solution anyway thx to someone.

and code was messy cause i was messing around with certain functions and ways to make it work how i want it so i was gonna finish it/make it clear/clean after i was done.

thank you for this. really has helped and does work now 100% thank you so much

1 Like