I want to set the position of an image label with a random value. This is the script that I have and the error I get is below. I have tried switching “offset” to “scale” but it won’t work.
The position X/Y Scale/Offset properties are read-only. To change a UIObject(such as an image) position, you must change the position as a whole using the UDim2 constructor:
local X = randomx:NextNumber(0.023, 0.884)
local Y = randomy:NextNumber(0.034, 0.461)
spiny.Position = UDim2.fromScale(X, Y)