Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to find the object being resized?

function onHandlesDrag(normal, distance)
	.Anchored = true
	if handles.Adornee then
		local delta = distance - previousDistance 
		if math.abs(delta) >= handles.Adornee.ResizeIncrement then
			local sizeDelta = math.floor(delta / handles.Adornee.ResizeIncrement + 0.5) * handles.Adornee.ResizeIncrement
			if handles.Adornee:Resize(normal, sizeDelta) then
				previousDistance = distance
			end
		end
	end
end

As you can see i have put .Anchored = true because the first thing i want is the resized part to be Anchored but i dont know which part is being resized or how to find it...

Thanks for the help! :D

1 comment

0

Assuming you clicked on the part before being able to resize it, just pass the argument through to the onHandlesDrag function

1 answer

✓ Accepted answer

The part you're moving/resizing is handles.Adornee. So, after what is currently line 2, put handles.Adornee.Anchored = true

This discussion is preserved as it was. New answers, comments, and votes are closed.