Following UI won't show

Hi devforum, i scripted a system that makes a UI frame follow the victim’s character when killed. Problem is that altough i made in it’s property that it’s visible and parented it to an Frame, it doesn’t show!


code sample:

local example = script.template:Clone()	
example.Parent = GUI:FindFirstChild("temp")
example.Visible = true
example.BackgroundTransparency = 1	
example.Label.Text = text	
example.Amount.Text = amount.."+"	
example.Label.MaxVisibleGraphemes = 0	
example.Label.BackgroundTransparency = 1
example.Label.TextTransparency = 0
example.Label.Visible = true
example.Amount.MaxVisibleGraphemes = 0
example.Amount.TextTransparency = 0
example.Amount.BackgroundTransparency = 1
example.Amount.Visible = true
example.Glow.ImageTransparency = 1	
example.Amount.TextColor3 = Color3.fromRGB(150, 76, 150)
example.Label.TextColor3 = Color3.fromRGB(255, 255, 255)

Any clues why this is happening?

1 Like

I guess, you’re changing the StarterGUI. Changing any UI elements in the StarterGUI will not give you any changes in the UI element because StarterGUI only able to apply the UI element to the Player.PlayerGUI when he joins but not to handle updates in the UI.

GUI is the playergui. look below here:

local GUI = player:WaitForChild("PlayerGui"):FindFirstChild("CurrentUI")

I’m not sure if this is a bug or a scripting problem, so please correct me if so.

Well, can you show what is template that is in your code?

I’ve found the root problem, but it’s still weird that it didn’t show at first. I do appreciate you trying to help me though! :grin: