game.Workspace.ChildAdded:connect(function(child)
local h = child:WaitForChild("Humanoid")
local Torso = h.Parent:FindFirstChild("Torso")
if h then
local Smoke = Instance.new("Smoke")
h.WalkSpeed = 32 --Change for different Walkspeed on join
Smoke.Parent = Torso
Smoke.Color = Color3.new(209, 0, 255)
Smoke.Opacity = 0
Smoke.RiseVelocity = 0
Smoke.Size = 0
end
local StickyBombValue = Instance.new("IntValue")
StickyBombValue.Parent = child
StickyBombValue.Name = "StickyBombValue"
local ImageLabel = game.StarterGui.ScreenGui:FindFirstChild("PlayerImage")
ImageLabel.Parent = game.StarterGui.ScreenGui
ImageLabel.Position = UDim2.new(0, 25, 0, 50)
ImageLabel.Size = UDim2.new(0, 100, 0, 100)
ImageLabel.Image = "rbxassetid://133293265"
ImageLabel.BackgroundColor3 = Color3.new(207, 207, 207)
end)
This is a script from my game that is intended to set everything up when a player joins. You can ignore everything until the image label part. For some reason, the ImageLabel just won't do anything. It won't change position, change size and it's invisible. However, if I take that block of script out of game.Workspace.ChildAdded:Connect(function(child) and just put it at the bottom of the script then it works fine. Any ideas as to why the ImageLabel won't work if its in a function?

2 comments
Thank you for the detailed answer. I had no idea that StarterGuis were cloned into PlayerGuis. Your script worked too! I just needed to get the player guy to change its position, size, etc. to it. Thank you so much!!!
I meant to say get the player gui, not guy. Lol.