I am trying to make a mouse cursor by moving an imagelabel to the actual mouse when they are hovering a textbutton.
People use this simple renderstepped event. Very easy to understand and impossible to understand.
game:GetService("RunService").RenderStepped:Connect(function()
icon.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
end)
To my knodwledge, this only works if you’re having everything above the imagelabel in offset - which is useless when making an actual game, as the UI would be all over the place on a different device. How do people make games with offset? How is this method ever possible? I’m very confused on why offset is even a thing, and why it then also seems to be the only option to move an imagelabel.
I then tried to move it with scale after realising it could be the issue. I don’t even know if that is the issue, but since no one seems to know I tried to read up on how to move it. This is the only thing I could find and it just gives an error that Scale cannot be assigned to Position.
game:GetService("RunService").RenderStepped:Connect(function()
icon.Position.Scale = UDim2.new(mouse.X, 0, mouse.Y, 0)
end)
The simple quesiton for this post is how to use scale in this situation or/and why/how using offset is an axis measurement to begin with.
From some viewport frame models being cut off randomly, clickdetectors activation distance rounding down to 0 after going below 25 and clickdetectors randomly not working for some models - UIs make no sense to me. Reading things on don’t solve any of the issues I have and most of them don’t get answered when posting and never existed on devforum in the past. I have found that scripting in studio has become a lot easier when I got better, but if the scripts relate to the UI then I am like a baby because they seem to be devoid of the logic used in 1 dimensional scripting.
There must be some basic knowledge I’m missing to solve these things. Maybe my understanding of scaling and offset are misslead, and maybe clickdetectors have hidden physics dependant properties that cause them to act seemingly randomly. It’s true I am far from a good programmer, but I can at the very least understand, implement and sometimes create less basic scripts. And even so, UIs are killing my drive to make anything.