I’m trying to clone an imagelabel from replicatedStorage into the ScreenGUI
i’ve inserted a script into the imagelabel it’s only a single line & prints out a simple “hello world” once it appears
I can see that it is inside ScreenGui, except my issue here is it’s not showing up on the stage or printing out any message, do clones just do that?
as far as i know it’s not offscreen, i’ve tried bumping up the ZIndex to a high number because i thought it might be just behind the background but to no avail… what’s going on?
here’s a look at the Script meant to spawn a clone of the imagelabel
local rs = game:GetService("ReplicatedStorage")
local sg = game:GetService("StarterGui").Aspectratiochecker.Borders
local npc = rs:WaitForChild("TEST")
local clone = npc:Clone()
clone.Parent = sg
if any further details are needed i’d be glad to provide
you are cloning it into starter gui which is probably not what you want to do, when you clone it into startergui thats like the gui that gets given to the player when they spawn, so what you would want to do is instead get the player then get playerGUI if you script is a local script you can do this:
local rs = game:GetService("ReplicatedStorage")
local plr = game.Players.LocalPlayer
local sg = plr.PlayerGui.Aspectratiochecker.Borders
local npc = rs:WaitForChild("TEST")
local clone = npc:Clone()
clone.Parent = sg
you might wanna change sg to something like plrGui or something
It looks like the Instance that is referenced inside the sg variable is the child of the ScreenGUI and not the ScreenGUI itself. Try:
local rs = game:GetService("ReplicatedStorage")
local sg = game:GetService("StarterGui").Aspectratiochecker
local npc = rs:WaitForChild("TEST")
local clone = npc:Clone()
clone.Parent = sg
And yes still make sure you are cloning it into PlayerGUI and not StarterGUI as StarterGUI is cloned once into a player when they join the game and altering it afterwards will not affect players that have already joined.