Script helping position

script.Parent.MouseButton1Up:Connect(function()
	finish = false
	if script.Parent.Position <= UDim2.new(0.182, 0,0.503, 0) then
		print("Working")
	end
end)

Problem: I want do like this

1 Like
script.Parent.Position == UDim2.new(position) then

why <=?

You can’t compare whole UDim2, but you can compare their individual properties, X and Y.

Does this work?

script.Parent.MouseButton1Up:Connect(function()
	finish = false
	if script.Parent.Position.X <= UDim.new(.182, 0)) then
		print("Working")
	end
end)

'Cause I’m making it happen automatically

1 Like