local findPosColor = function(position)
	local start = Vector3.new(0, 100, 0)
	local part = Workspace:FindPartOnRay(Ray.new(start, (position - start).unit * 500))
	if part then
		return Color3.new(part.BrickColor.Color.r, part.BrickColor.Color.g, part.BrickColor.Color.b)
	end
	return nil
end

error:

Players.Player1.PlayerGui.ScreenGui.Radar.LocalScript:22: bad argument #1 to '?' (Vector3 expected, got number) (line 22 is the local part = ... line)

1 comment

0

Not too sure, try making the ray on a separate line with a variable, then use FindPartOnRay with the variable you made.