Having issues trying to make the ball move, no error included

Another topic before the year ends-

-- \\ Variables // --

local Randomzier = Random.new()

local Meditation = Instance.new("BoolValue")

local GUIS = script.Parent

local Circle = script.Parent.MovingCircle

-- \\ Services/Service-Related Variables // --

UIS = game:GetService("UserInputService")

local MLocation = UIS:GetMouseLocation()
-- \\ Functions // --

GUIS.IgnoreGuiInset = true

UIS.InputBegan:Connect(function()
	
	if MLocation == Circle.Position.X and Circle.Position.Y then
		print("On the circle..")
		repeat 
		script.Parent.MovingCircle:TweenPosition(
			UDim2.new(Randomzier:NextNumber(0.962, 0),0 ,Randomzier:NextNumber(0.285, 0),0),
			Enum.EasingDirection.Out,
			Enum.EasingStyle.Linear,
			5,
			false,
			nil

			)
		until
		UIS:GetMouseLocation() ~= script.Parent.MovingCircle.Position 
		
	else
	end
end)

Currently. I think the biggest issue I’m having is trying to get the Mouse and GUI acknowledge their locations are overlapping so the ball can move. No error, nothing like that. It just doesn’t move around on the screen.

Have you tried putting prints in to get a route map of what is happening?

Maybe its because you didnt put local in from of UIS when first mentioned

1 Like

This wasn’t the case, but regardless it is good practice to put my locals on whenever I can.

How would I do this? Also, when you mention Route Map, do you mean trying to figure out where the mouse is or something else?

Fixed it by myself. The issue was the Position wasn’t converted for the gui to acknowledge it’s location.

1 Like