I'm new to the scaling property when it comes to;
UDim2.new(1,0,1,0)
So I'm having a difficult time thinking of how I'd scale an image to the players mouse. I've tried stuff like this;
local player = game.Players.LocalPlayer local mouse = player:GetMouse() local image = script.Parent:WaitForChild("ImageLabel") image.Position = UDim2.new(mouse.X,0,mouse.Y,0)
It's a bit frustrating, because I keep getting 100 or 200 in the properties of the position just because of the way Mouse.X works.
So if anyone's out there that understands what I mean and would like to give me a solution to my problems I'm all ears.
I know you have to use math to determine the scaling, I just don't understand what type of method to use
Hi, Acerion. In this script You donot need math.. Instead of image.Position = UDim2.new(mouse.X,0,mouse.Y,0) Try, image.Position = UDim2.new(0,mouse.X,0,mouse.Y) This should work for what you are trying to do..
local player = game.Players.LocalPlayer local Mouse = player:GetMouse() local image = script.Parent:WaitForChild("ImageLabel") while wait() do image.Position = UDim2.new(0, Mouse.X, 0, Mouse.Y) end