function PointInPart(point, part)
    point = part.CFrame:pointToObjectSpace(point)
    return math.abs(point.X) <= part.Size.X / 2
        and math.abs(point.Y) <= part.Size.Y / 2
        and math.abs(point.Z) <= part.Size.Z / 2
end

local mouse = game.Players.LocalPlayer:GetMouse()
local player = game.Players.LocalPlayer
local character = player.Character

mouse.Move:connect(function()
	if mouse.Target then
		if PointInPart(mouse.Hit.p,workspace.Part) and (character.HumanoidRootPart.Position-workspace.movepart.Position).magnitude>100 then
				workspace.movepart.Transparency = 0.5			
				workspace.movepart.CFrame = CFrame.new(mouse.Hit.p.X-mouse.Hit.p.X%2,1,mouse.Hit.p.Z-mouse.Hit.p.Z%2)
	
		else
				workspace.movepart.Transparency = 0
				workspace.movepart.CFrame = CFrame.new(mouse.Hit.p.X-mouse.Hit.p.X%2,1,mouse.Hit.p.Z-mouse.Hit.p.Z%2)	
		end		
	end


end)

Why does the magnitude change do not change the transparency of the Part (It should change by 0.5)