- What do you want to achieve? Keep it simple and clear!
So im making a small task/minigame inside my obby. I need a wire(In this case a frame) resize/follow the mouse.
Example of what i want:
- What is the issue? Include screenshots / videos if possible!
My issue is that i absolutley suck at math lol. This is the math/formula i got going atm which probs isnt the best XD
It works i guess. But its not the most efficient way im pretty sure.
local M = game.Players.LocalPlayer:GetMouse()
M.Move:Connect(function()
local Dist = (M.X - script.Parent.Frame.AbsoluteSize.X / 2)
script.Parent.Frame.Size = UDim2.fromOffset(Dist,0)
end)
- What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ive tried lookin for some solutions. I found some but they werent exactly what i was looking for in this case sadly
Any help would be really cool because im stuck here lol. If i cant get this solved im afraid im going to have to switch up this task in the game.