local function a(a,R)if not R then local R=screenSpace.ScreenToWorld(a.Position.X,a.Position.Y,1)local y=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(screenSpace.ScreenToWorld(a.Position.X,a.Position.Y,1))y=game.Workspace.CurrentCamera.CoordinateFrame.p-y local k=screenSpace.ScreenToWorld(a.Position.X,a.Position.Y,50)k=game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(k)*-1 if k.magnitude>900 then k=k.unit*900 end local z=Ray.new(y,k)local I,D=game.Workspace:FindPartOnRay(z,player.Character)if D then frame(D)end end end local R=nil
-- Function to bind to touch moved if player is on mobile
local function mobileFrame(touch, processed)
	-- Check to see if the touch was on a UI element. If so, we don't want to update anything
	if not processed then
		-- Calculate touch position in world space. Uses Stravant's ScreenSpace Module script
		-- to create a ray from the camera.
		local test = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
		local nearPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(
			screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 1)
		)
		nearPos = game.Workspace.CurrentCamera.CoordinateFrame.p - nearPos
		local farPos = screenSpace.ScreenToWorld(touch.Position.X, touch.Position.Y, 50)
		farPos = game.Workspace.CurrentCamera.CoordinateFrame:vectorToWorldSpace(farPos) * -1
		if farPos.magnitude > 900 then
			farPos = farPos.unit * 900
		end
		local ray = Ray.new(nearPos, farPos)
		local part, pos = game.Workspace:FindPartOnRay(ray, player.Character)

		-- if a position was found on the ray then update the character's rotation
		if pos then
			frame(pos)
		end
	end
end

local oldIcon = nil
