ImageLabel Not Appearing in UI

Imagelabel doesn’t appear after being cloned. Only its rotation works while their size and pos doesn’t, please help! It prints everything.

local Debris = game:GetService("Debris")
local Ts = game:GetService('TweenService')
local info = TweenInfo.new(.3, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)

local Rs = game:GetService('ReplicatedStorage')
local Modules = Rs.Modules

local RocksGui = game:GetService("StarterGui").Rocks
local RockImage = script.RockImage

local module = {}

function module.RandomRocks()
	print("Working")
	
	local Clone = RockImage:Clone()
	
	Clone.Visible = true
	Clone.Parent = RocksGui
	Clone.Rotation = math.random(0, 360)
	Clone.Size = UDim2.fromScale(math.random(.1, .15), math.random(.1, .15))
	Clone.Position = UDim2.fromScale(math.random(0, .844), math.random(0, .844))
	
	Debris:AddItem(Clone, 5)
	print("Done")
end

return module

I already have the gui and everything. This looks AI generated.

1 Like

Uhh You are have giving you? Gui

Read the code. I don’t need to create instances if I already have them.

Okay sorry I’m really maybe enjoying day

It’s alright! Don’t worry about it!

The clone does not appear at all? Or does it appear and only the roation works for the cloned version?

It clones to the gui and rotates but its pos and size doesn’t change. I can’t even see the image.

You are using StarterGui instead of PlayerGui

PlayerGui is what will appear on the players screen while ScreenGui is what the player will start with.

1 Like

This sorted one of the problems, the problem was with math.random(), it doesn’t use integers so I had to use Random.New():NextNumber(). I’ll mark this as the solution though. The problem is fixed now.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.